<DIV>Daniele,</DIV>
<DIV><BR>There is no way (as far as I know) for mapserver to output such information since mapsver is state-less and wouldn't know which image you were reffering to.</DIV>
<DIV><BR>However, you can do it by managing all of the extent information on the client side using javascript. The best solution I've found is Steve Lime's mapserv.js. You can check it out in action at:</DIV>
<DIV><BR><A href="http://www.dnr.state.mn.us/maps/landview_dhtml.html">http://www.dnr.state.mn.us/maps/landview_dhtml.html</A></DIV>
<DIV><BR>Check out the page source for the URL to mapserv.js and for an example of how it is used (look for the ms.* javascript variables). It really helps with interface development since you're just swapping images instead of reloading the page so you can maintain alot of info a javascript variables. This solution is also nice since you no longer have to deal with temp images being stored on your hard drive.</DIV>
<DIV><BR>Matt Perry<BR>Humboldt State University<BR><BR><B><I>Daniele Margotti &lt;margottid@COMUNE.LUGO.RA.IT&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Hi,<BR>I have a question about using Javascript to update maps in a web page.<BR><BR>If I don't want to reload the page every time I request a new map, I can<BR>use javascript to re-create - on the fly - only objects that change, for<BR>instance "map" (using: img src="/cgi-bin/mapserv?mode=map...."), "scalebar"<BR>(using: img src="/cgi-bin/mapserv?mode=scalebar....") and "reference"<BR>(using: img src="/cgi-bin/mapserv?mode=reference....").<BR><BR>When I use MapServer CGI, some variables (current scale, current<BR>extent, ...) are automatically updated by MapServer that substitutes the<BR>field name (e.g.: [scale]) in the template.<BR><BR>Can I obtain these values from MapServer only using Javascript?<BR>I think I cannot calculate these values with Javascript functions because<BR>MapServer, when creates a map, modifies the requested extent (and,<BR>consequently, the scale) adjusting
 it on the base of pixel size, right?<BR>So... Is there a "mode" in MapServer that outputs, instead of a<BR>map/scalebar/reference image, a value (for current scale or current extent)?<BR><BR><BR>Thank you,<BR>Daniele<BR></BLOCKQUOTE>