[Mapserver-users] JBox with Mozilla 1.6, Load java applet faild

Shiming Li sli1 at uni-forst.gwdg.de
Wed Mar 10 08:25:43 EST 2004


I tried to implement the zoom-box with the jBox, but it shows  grey 
color in the image area. There is a message showed in the status bar: 
Loading Java Applet failed.
Following  http://mapserver.gis.umn.edu/doc40/jbox-howto.html.
1)  inserted
<SCRIPT LANGUAGE="JavaScript">

       function setbox_handler(name, minx, miny, maxx, maxy) {
         document.mapserv.imgbox.value = minx + " " + miny + " " + maxx 
+ " " + maxy;
         document.mapserv.imgxy.value = minx + " " + miny;
         // Additional code can go here prior to the form submit, below.
         // For example, form validation code.
         document.mapserv.submit();
       }

       function seterror_handler(message) {
         alert(message);
       }
</SCRIPT>
2) change the line to <form method=GET action="[program]" name="mapserv">
inserted the line <input type="hidden" name="imgbox" value="-1 -1 -1 -1">
3) replace output map image defination with the following
   <td  align="center" colspan="2">
           <applet
                 
codebase="/usr/local/apache2/htdocs/titasca/java/mapplet/lib"
                 code="jBoxPNG.class"
                 archive="jBoxPNG.jar,png.jar"
                 width="600"
                 height="600"
                 name="jBoxPNG"
                 MAYSCRIPT>
             <param name="image" value="http://[host][img]">
           </applet>
     </td>     The directory of the lib and the jBox* files can be 
accessable and executed by all persons.

I had installed the Java SDK 1.4.2,  other information Mozilla 1.6, SuSE 
linux, MapServer 4.01.

Is there something wrong?

Regards,
karl



More information about the mapserver-users mailing list