in reply to Multiple GD::graphs in one web page

If you are already creating them dynamically, you can turn that portion into a separate CGI script. Use that CGI script as the SRC value in the IMG tag.

<img src="http://www.example.com/cgi-bin/make_graph.cgi?values" />

Your CGI script has to return the right MIME type, such as "image/png" or something else.

Once you put those things in IMG tags, you just use the tags in the HTML like any other IMG tag.

--
brian d foy <brian@stonehenge.com>

Replies are listed 'Best First'.
Re^2: Multiple GD::graphs in one web page
by mhearse (Chaplain) on Apr 06, 2005 at 22:50 UTC
    Thanks, this worked. As you suggested, I used the CGI script itself as the image. Passing an argument of 1..4 in order to tell the script what image I wanted.
    <img src="/cgi-bin/trend.cgi?image=1"> <img src="/cgi-bin/trend.cgi?image=2"> <img src="/cgi-bin/trend.cgi?image=3"> <img src="/cgi-bin/trend.cgi?image=4">
    The CGI script, or course, accepted the param and returned the corresponding image.