<html><div style='background-color:'><P>Hi all,</P>
<P>I have implemented image swapping with jBox. When I try panning, and Zooming out everything works fine <B>the first time </B>I move my map. But in the second (and subsequent) attempts fail Zooming in the map. Anyone knows how to correct it? I´m novice in JavaScript</P>
<P>It´s the code:</P>
<P><html><head><title>JBOX</title></P>
<P><SCRIPT LANGUAGE="JavaScript"></P>
<P>function setbox_handler(name, minx, miny, maxx, maxy) {</P>
<P>document.mapserv.imgbox.value = minx + " " + miny + " " + maxx + " " + maxy;</P>
<P>document.mapserv.imgxy.value = minx + " " + miny;</P>
<P>// Additional code can go here prior to the form submit, below.</P>
<P>// For example, form validation code.</P>
<P>document.mapserv.submit();</P>
<P>}</P>
<P>function seterror_handler(message) { </P>
<P>alert(message);</P>
<P>}</P>
<P>function reset_handler(name, minx, miny, maxx, maxy) { }</P>
<P></SCRIPT></P>
<P></head></P>
<P><body></P>
<P><form name="mapserv" method=GET action="[program]" ></P>
<P><input type="hidden" name="program" value="[program]"></P>
<P><input type="hidden" name="map" value="[map]"></P>
<P><input type="hidden" name="imgext" value="[mapext]"></P>
<P><input type="hidden" name="imgxy" value="[center]"></P>
<P><input type="hidden" name="zoomsize" value="2"></P>
<P><input type="hidden" name="imgbox" value="-1 -1 -1 -1"></P>
<P><applet codebase="../java/jBox" archive="jBox.jar" code="jBox.class" width="400" height="300" name="jBox" MAYSCRIPT></P>
<P><param name="image" value="http://[host][img]"></P>
<P></applet></P>
<P><br></P>
<P>Zoom In <input type=radio name=zoomdir value=1 OnClick='document.jBox.boxon()' [zoomdir_1_check]></P>
<P>Pan <input type=radio name=zoomdir value=0 OnClick='document.jBox.dragon()' [zoomdir_0_check]></P>
<P>Zoom Out <input type=radio name=zoomdir value=-1 OnClick='document.jBox.boxoff()' [zoomdir_-1_check]></P>
<P><input type="submit" value="Refresh"></P>
<P><br> </form> </P>
<P></body></P>
<P></html> </P>
<P>Best Regards,</P>
<P>Marcello Benigno </P></div></html>