[Mapbender-commits] r2436 - trunk/mapbender/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed May 7 09:11:02 EDT 2008


Author: christoph
Date: 2008-05-07 09:11:02 -0400 (Wed, 07 May 2008)
New Revision: 2436

Modified:
   trunk/mapbender/http/php/mod_zoomCoords_en.php
Log:
bugfix, merged from branch 2.5

Modified: trunk/mapbender/http/php/mod_zoomCoords_en.php
===================================================================
--- trunk/mapbender/http/php/mod_zoomCoords_en.php	2008-05-07 13:08:28 UTC (rev 2435)
+++ trunk/mapbender/http/php/mod_zoomCoords_en.php	2008-05-07 13:11:02 UTC (rev 2436)
@@ -81,7 +81,7 @@
 <?php
 echo '<script type="text/javascript">';
 
-echo "var mod_zoomCoords_target = '".$e_target[0]."';";
+echo "var mod_zoomCoords_target = '".$e_target."';";
 echo "var target = mod_zoomCoords_target.split(',');";
 
 
@@ -104,14 +104,14 @@
    var valid = true;
     
  /*  if(parseFloat(coordx) < 5.88 ||  parseFloat(coordx) > 15){
-      alert("Eingabe unzul�ssig!");
+      alert("Eingabe unzulässig!");
       document.form1.X.select();
       document.form1.X.focus();
       valid = false; 
       return false;
    }
    if(parseFloat(coordy) < 46.62 ||  parseFloat(coordy) > 55.71){
-      alert("Eingabe unzul�ssig!");
+      alert("Eingabe unzulässig!");
       document.form1.Y.select();
       document.form1.Y.focus();
       valid = false;
@@ -128,20 +128,21 @@
 }
 
 function highlight(x, y){
-  
-   x=x.replace(",",".");
-   y=y.replace(",",".");
-   
-   document.form1.X.value=x;
-   document.form1.Y.value=y;
-   
-   if (isNaN(x)==true || isNaN(y)==true){
-     
-   }
-   else{
-      parent.mb_showHighlight(target[0],x,y);
-      parent.mb_showHighlight(target[1],x,y);
-   }
+	if(x!='' && y!=''){
+       x=x.replace(",",".");
+	   y=y.replace(",",".");
+	   
+	   document.form1.X.value=x;
+	   document.form1.Y.value=y;
+	   
+	   if (isNaN(x)==true || isNaN(y)==true){
+	     
+	   }
+	   else{
+	      parent.mb_showHighlight(target[0],x,y);
+	      parent.mb_showHighlight(target[1],x,y);
+	   }
+	}   
 }
 
 function hideHighlight(){
@@ -171,7 +172,7 @@
       echo "<span class='labely'>Y-Coordinate:</span>";
       echo "<input class='textx' type='text' name='X'>";
       echo "<input class='texty' type='text' name='Y'>";
-      echo "<input class='send' type='button' value='ok' onclick='zoomCoordinate();' onmouseover='highlight(document.form1.X.value, document.form1.Y.value)' onmouseout='hideHighlight(document.form1.X.value, document.form1.Y.value)' >";
+      echo "<input class='send' type='button' value='ok' onclick='zoomCoordinate();' onmouseover='highlight(document.form1.X.value, document.form1.Y.value)' onmouseout='if(document.form1.X.value !=\"\" && document.form1.Y.value !=\"\"){hideHighlight(document.form1.X.value, document.form1.Y.value);}' >";
 
 ?>
 </form>



More information about the Mapbender_commits mailing list