> -----Original Message-----
> From: Pablo Velasquez [mailto:pablo_velasquez@;citysearch.com]
> Basically, I was hoping to do my calculations, send my $vars 
> to a TT template 
> that prints out an html table AND a nice graph on the same 
> page. All in one 
> go. The graph being dynamic since the reports will be 
> different every time 
> and I did hope to avoid having tons of png files to clean up later.
> 
> I suppose I may be asking for too much :-) 

No, you can't do what you want to do. You are indeed asking too much. :)

If the entire world were HTTP/1.1 and you didn't mind rewriting the webserver, you 
might be able to keep the image in memory and wait for the second request but 
currently you just can't. The browser is going to connect, get the html, and after 
potentially disconnecting ask for the image in a second request.

Do what Randal shows, stuffing the recently generated image in a temp directory and 
giving out a dynamic picture url that references it is the way to go.

And hope that in XHTML2.0, there is someway to abuse the <OBJECT> tag so that you 
could embed the image straight into the page... cause till then, you're stuck working 
around the stateless/multiple connect nature of HTTP connections.

--mark

_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://www.template-toolkit.org/mailman/listinfo/templates

Reply via email to