Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Multiple GD::graphs in one web page

by brian_d_foy (Abbot)
on Apr 06, 2005 at 21:41 UTC ( [id://445454]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://445454]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-19 19:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found