my mapserver does not work in IE

temiz temiz at DEPREM.GOV.TR
Thu Dec 9 05:53:47 PST 2004


hello

For mapscript zoom function, this javascript code does not work in IE,
but works in Linux browsers such as FireFox and Mozilla .

Which part does not suit IE ?

Here is the code ?

~~~~~~~~~~~~
function startRubber (evt) {

     if (document.all) {

     var r = document.all.rubberBand;
     r.style.width = 0;
     r.style.height = 0;
     r.style.pixelLeft = event.x;
     r.style.pixelTop  = event.y;
     r.style.visibility = 'visible';
   }

   else if (document.layers) {
     var r = document.rubberBand;
     r.clip.width = 0; r.clip.height = 0;
     r.left = evt.x;
     r.top = evt.y;
     r.visibility = 'show';
   }

   else if (document.getElementById) {
        var r = document.getElementById('rubberBand');
     r.style.width = 0;
     r.style.height = 0;
     r.style.left = evt.clientX + 'px';
     r.style.top = evt.clientY + 'px';
     r.style.visibility = 'visible';
   }

   document.captureEvents(Event.MOUSEMOVE);
   document.onmousemove = moveRubber;
}

function moveRubber (evt) {

  if (document.all) {
     var r = document.all.rubberBand;
     r.style.width = event.x - r.style.pixelLeft - 2;
     r.style.height = event.y - r.style.pixelTop - 2;
     var f = document.forms('viewmap');
     f.w.value = r.style.width;
     f.h.value = r.style.height;
   }

   else if (document.layers) {
     var r = document.rubberBand;
     r.clip.width = evt.x - r.left - 2 ;
     r.clip.height = evt.y - r.top - 2;
     r.document.open();
    r.document.write('<table width="'
      + r.clip.width + '" height="' + r.clip.height
      + '" BORDER="1"><tr><td><\/td><\/tr><\/table>');
     r.document.close();
     var f = document.forms('viewmap');
     f.w.value = r.clip.width;
     f.h.value = r.clip.height;
   }

  else if (document.getElementById) {
     var r = document.getElementById('rubberBand');
     r.style.width = evt.clientX - parseInt(r.style.left) - 2;
     r.style.height = evt.clientY - parseInt(r.style.top) - 2;
     var ht = document.getElementById('h');
     var wt = document.getElementById('w');
     wt.value = r.style.width;
     ht.value = r.style.height;
   }
 }

function stopRubber (evt) {
      document.releaseEvents(Event.MOUSEMOVE);
      document.onmousemove = null;

 }
~~~~~~~~~~~~~~~~


kind regards


Ahmet Temiz



______________________________________
XamimeLT - installed on mailserver for domain @deprem.gov.tr
Queries to: postmaster at deprem.gov.tr
______________________________________
The views and opinions expressed in this e-mail message are the sender's own
and do not necessarily represent the views and the opinions of Earthquake Research Dept.
of General Directorate of Disaster Affairs.

Bu e-postadaki fikir ve gorusler gonderenin sahsina ait olup, yasal olarak T.C.
B.I.B. Afet Isleri Gn.Mud. Deprem Arastirma Dairesi'ni baglayici nitelikte degildir.



More information about the MapServer-users mailing list