[Mapserver-users] Itasca Demo DHTML Help?

Inge Keckeisen inke03 at gmx.net
Wed Jul 7 02:38:04 EDT 2004


Hi Jerod,

I did the dhtml demo without frames in replacing the frames.html with a 
  html file without frameset but a normal body. In this new file the 
javascript function "load_map()" is modified:

function load_map() {
         var template;
         var query = location.search.substring(1);
         var pairs = query.split("&");
         for(var i = 0; i < pairs.length; i++) {
           var pos = pairs[i].indexOf('=');
           if (pos == -1) continue;
           var name = pairs[i].substring(0,pos);
           if(name == 'map_web_template') {
             template = pairs[i].substring(pos+1);
	    template = unescape(template.replace(/\+/g, " "));
             break;
           }
         }
         window.location.href = template + "?" + query;
       }

You can call this function in the body tag of the new file --> 
onLoad="load_map()".
Of course you have to modify the function "submit_form()" in the 
index.html, so the new html file will be called instead of the frames.html:

function submit_form() {
          var template = 
document.demo.map_web_template.options[document.demo.map_web_template.selectedIndex].value;
         if(template.indexOf("PART OF YOUR TEMPLATE NAME") != -1) 
document.demo.action = "NEW.html";

Hope this was understandable, if not, send me a note and I send you my 
modified files.

Regards,
Inge


 >From: Jerod Clabaugh <jclabaugh at mac.com>
 >Subject: [Mapserver-users] Itasca Demo DHTML Help?
 >
 >hello all:
 >
 >I have been  able to modify the MS 4 Itasca demo to use my map file
 >and data.  Basically I want the use of the DHTML rubber band zoom box
 >(dbox) but without using frames.  I have been struggling and haven't
 >been able to modify the code to not use frames.  I want the query
 >section to use a popup window instead of a lower frame.  I'm not so
 >concerned with the actually scripting necessary for the popup action
 >itself but rather how to modify Steve Lime's code to remove the
 >frames in the demo while still providing a functional zoom box.
 >
 >Does anyone have a simple solution for  this using this DHTML zoom
 >box without frames?



More information about the mapserver-users mailing list