Blame | Letzte Änderung | Log anzeigen | RSS feed
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"><HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1"><LINK REL="Start" HREF="index.html"><LINK REL="Contents" HREF="toc.html"><LINK REL="Prev" HREF="7UsingimagemapswithJpGraph.html"><LINK REL="Next" HREF="72Specifyingtargetsforimagemapplots.html"><STYLE TYPE="text/css"><!--BODY { font-family: serif }H1 { font-family: sans-serif }H2 { font-family: sans-serif }H3 { font-family: sans-serif }H4 { font-family: sans-serif }H5 { font-family: sans-serif }H6 { font-family: sans-serif }SUB { font-size: smaller }SUP { font-size: smaller }PRE { font-family: monospace }A { text-decoration: none }--></STYLE></HEAD><BODY><A HREF="toc.html">Contents</A><A HREF="7UsingimagemapswithJpGraph.html">Previous</A><A HREF="72Specifyingtargetsforimagemapplots.html">Next</A><HR NOSHADE><H2><A NAME="7_1">7.1 The basic structure of an image map script</A></H2><P> The standard structure for an HTML page using client side image mapswould be something along the lines of</P><P></P><PRE>// Image map specification with name "mapname"<MAP NAME=...>... specification ...</MAP>// Image tag<img src="..." ISMAP USEMAP="mapname"></PRE><P> This poses an interesting question.</P><P> Since we normally call the graphing script directly in the <img> taghow do we get hold of the image map (which is available only in theimage script) in this "HTML wrapper" script?</P><P> In JpGraph there is actually two ways of solving this.</P><OL><LI> Use the preferred "builtin" way using the modified Stroke() methodGraph::StrokeCSIM() instead of the standard Graph::Stroke() method.</LI><LI> Directly use the Graph::GetHTMLImageMap() which gives you finecontrol at the expense of more complex coding.</LI></OL><P> The first (and preferred) way modifies the stroke method so thatinstead of returning an image (like the standard Stroke() method)StrokeCSIM() actually returns an HTML page containing both the imagemap specification and the correct <IMG> tag.</P><P> This of course means that it is necessary to treat an image mapreturning image script differently from a non-CSIM image script, forexample you can't use it directly as the target for the "src" attributeof the <IMG> tag since it sends back an actual HTML page containingboth an image tag together with an image map.</P><HR NOSHADE><A HREF="toc.html">Contents</A><A HREF="7UsingimagemapswithJpGraph.html">Previous</A><A HREF="72Specifyingtargetsforimagemapplots.html">Next</A></BODY></HTML>