DMS Converter

Author Message
Meg

  • Total Posts : 123
  • Scores: 6
  • Reward points : 0
  • Joined: 7/13/2006
  • Location: Australia
  • Status: offline
DMS Converter Saturday, March 29, 2008 7:22 PM (permalink)
0
Convert to and from:
Degrees, Minutes, Seconds
Degrees, Decimal Minutes 
Decimal Degrees

This script is unique in that you can move the pointer and it will show you the coordinates in three different formats.
manually edit any field and it like a spreadsheet it will update all the other fields and display the position on the map.
This script was designed as a HTA but crashes when you zoom in too much. Save this code with a HTM extension instead. It will run locally from your C: drive but works best from a website like this.

 <html> 
 <head> 
 <title>DMS</title> 
 
 <SCRIPT LANGUAGE="VBScript">
 '# -----------------------------------------------------------------------------
 '# DMS Coordinates Converter
 '# Copyright (C) 2008 Painterinfo
 '# Script by MJP
 '# 
 '# You have a royalty-free right to use, modify, reproduce and distribute
 '# this script (and/or any modified version) in any way you find useful,
 '# provided that you agree that Painterinfo or MJP has no
 '# warranty, obligations or liability for the script. If you use or modify
 '# the script, you must retain this copyright notice. ThankYou
 '# -----------------------------------------------------------------------------
 </SCRIPT>
 
  
 <style> 
 body,td a {font-family:Tahoma, Veranda, Arial; font-size:16px; text-decoration:none; color:black;} 
 H1 { font-family:Tahoma, Veranda, Arial; font-size:20px; color : blue; } 
 a:link { color : yellow; background : transparent ;   text-decoration: underline ; font-size:12px;} 
 a:visited { color : yellow; background : transparent ;   text-decoration: none ; font-size:12px;} 
 a:Hover { color : red; background : transparent ;   text-decoration: none ; font-size:12px;} 
 </style> 
  
 
 <SCRIPT Language="VBScript"> 
 '------------------------------------------------------------ 
 Sub Window_Onload 
     Main.Style.Display = "inline"
     MainLon.Style.Display = "inline"  
     map.Style.Display = "inline" 
     LAT=-25.347749
     LON=131.030631
     ZOOM=14
     GmapsLoad
     LatHTML
     LonHTML
 End Sub
 '------------------------------------------------------------ 
     Dim LAT, LON, ZOOM
                  
 '------------------------------------------------------------ 
 Sub EnterPressed()
     If window.event.Keycode = 13 Then
         run_button1.focus
     End If
 end sub
 
 '------------------------------------------------------------ 
 
 Sub VerifyEntryAA   
     Set objRegEx = CreateObject("VBScript.RegExp")
     objRegEx.Global = True   
     objRegEx.Pattern = "[^0123456789-]"
     strString = TextBox1.Value
     Set colMatches = objRegEx.Execute(strString)  
     If colMatches.Count > 0 Then
         If InStr(TextBox1.Value, ".") Then
             MsgBox "Do not use decimal point"
             TextBox1.Value = TextBox4.Value
            TextBox1.Focus
             Exit Sub
         ElseIf InStr(TextBox1.Value, "-") Then
             Msgbox "Do not use negative values"
             TextBox1.Value = TextBox4.Value
            TextBox1.Focus
             Exit Sub
         Else
             Msgbox "You entered an invalid character."
             TextBox1.Value = TextBox4.Value
            TextBox1.Focus
             Exit Sub
         End If 
     End If
     If TextBox1.Value="" Then
      Msgbox "Do not Enter Blank"
         TextBox1.Value = TextBox4.Value
  TextBox1.Focus
  Exit Sub 
     End if
     
     TextBox4.Value = TextBox1.Value
     TextBox6.Value = Round((abs(TextBox4.Value)+(TextBox5.Value/60)), 6)
     if latSymbol1.innerhtml="S" then 
        TextBox6.Value="-"&TextBox6.Value
     end if
     VerifyEntryCA
      
 End Sub
 '------------------------------------------------------------ 
 Sub VerifyEntryAB   
     Set objRegEx = CreateObject("VBScript.RegExp")
     objRegEx.Global = True   
     objRegEx.Pattern = "[^0123456789]"
     Set colMatches = objRegEx.Execute(TextBox2.Value)  
     If colMatches.Count > 0 Then
         If InStr(TextBox2.Value, ".") Then
             MsgBox "Do not use decimal point"
             TextBox2.Value = Floor(TextBox5.Value)
             TextBox2.Focus
            Exit Sub
         else 
             Msgbox "You entered an invalid character."
             TextBox2.Value = Floor(TextBox5.Value)
             TextBox2.Focus
            Exit Sub
         End If
     End If
     If TextBox2.Value="" Then
      Msgbox "Do not Enter Blank"
  TextBox2.Value = Floor(TextBox5.Value)
  TextBox2.Focus
  Exit Sub 
     End if
     
     TextBox5.Value = Round((TextBox2.Value+(TextBox3.Value/60)), 4)
     TextBox6.Value = Round((Abs(TextBox4.Value)+(TextBox5.Value/60)), 6)
     if latSymbol1.innerhtml="S" then 
        TextBox6.Value="-"&TextBox6.Value
     end if
     VerifyEntryCA
     
 End Sub
 '------------------------------------------------------------ 
 Sub VerifyEntryAC   
     Set objRegEx = CreateObject("VBScript.RegExp")
     objRegEx.Global = True   
     objRegEx.Pattern = "[^0123456789.]"
     Set colMatches = objRegEx.Execute(TextBox3.Value)  
     If colMatches.Count > 0 Then
         Msgbox "You entered an invalid character."
  TextBox3.Value = Round(((TextBox5.Value-(Floor(TextBox5.Value)))*60), 2)
         TextBox3.Focus
         Exit Sub
     End If
     If TextBox3.Value="" Then
      Msgbox "Do not Enter Blank"
  TextBox3.Value = Round(((TextBox5.Value-(Floor(TextBox5.Value)))*60), 2)
  TextBox3.Focus
  Exit Sub 
     End if
     if ubound(split(lcase(TextBox3.Value), ".")) <=1 then 
  TextBox5.Value = Round((TextBox2.Value+(TextBox3.Value/60)), 4)
  TextBox6.Value = Round((Abs(TextBox4.Value)+(TextBox5.Value/60)), 6)
     if latSymbol1.innerhtml="S" then 
         TextBox6.Value="-"&TextBox6.Value
     end if
     Else     
      MsgBox "You entered More than 1 decimal point."
  TextBox3.Value = Round(((TextBox5.Value-(Floor(TextBox5.Value)))*60), 2)
  TextBox3.Focus
      exit sub
     End if
     VerifyEntryCA
 End Sub
 '------------------------------------------------------------ 
 Sub VerifyEntryBA   
     Set objRegEx = CreateObject("VBScript.RegExp")
     objRegEx.Global = True   
     objRegEx.Pattern = "[^0123456789-]"
     Set colMatches = objRegEx.Execute(TextBox4.Value)  
     If colMatches.Count > 0 Then
         If InStr(TextBox4.Value, ".") Then
             MsgBox "Do not use decimal point"
      TextBox4.Value = Floor(Abs(TextBox6.Value))
        TextBox4.Focus
             Exit Sub
         ElseIf InStr(TextBox4.Value, "-") Then
             Msgbox "Do not use negative values"
      TextBox4.Value = Floor(Abs(TextBox6.Value))
        TextBox4.Focus
             Exit Sub
         else 
             Msgbox "You entered an invalid character."
      TextBox4.Value = Floor(Abs(TextBox6.Value))
        TextBox4.Focus
             Exit Sub
         End If
     End If
     If TextBox4.Value="" Then
      Msgbox "Do not Enter Blank"
  TextBox4.Value = Floor(Abs(TextBox6.Value))
  TextBox4.Focus
  Exit Sub 
     End if
     
     TextBox1.Value = TextBox4.Value
     TextBox6.Value = Round((Abs(TextBox4.Value)+(TextBox5.Value/60)), 6)
     if latSymbol1.innerhtml="S" then 
        TextBox6.Value="-"&TextBox6.Value
     end if
     VerifyEntryCA
     
 End Sub
 '------------------------------------------------------------ 
 Sub VerifyEntryBB   
     Set objRegEx = CreateObject("VBScript.RegExp")
     objRegEx.Global = True   
     objRegEx.Pattern = "[^0123456789.]"
     Set colMatches = objRegEx.Execute(TextBox5.Value)  
     If colMatches.Count > 0 Then
         Msgbox "You entered an invalid character."
  TextBox5.Value = Round(((Abs(TextBox6.Value)-(Floor(Abs(TextBox6.Value))))*60), 4)
         TextBox5.Focus
         Exit Sub
     End If
     If TextBox5.Value="" Then
      Msgbox "Do not Enter Blank"
  TextBox5.Value = Round(((Abs(TextBox6.Value)-(Floor(Abs(TextBox6.Value))))*60), 4)
  TextBox5.Focus
  Exit Sub 
     End if
     if ubound(split(lcase(TextBox5.Value), ".")) <=1 then     
  TextBox2.Value = Floor(TextBox5.Value)  
  TextBox3.Value = Round(((TextBox5.Value-(Floor(TextBox5.Value)))*60), 2)
         TextBox6.Value = Round((Abs(TextBox4.Value)+(TextBox5.Value/60)), 6)
         if latSymbol1.innerhtml="S" then 
             TextBox6.Value="-"&TextBox6.Value
         end if
     Else     
      MsgBox "You entered More than 1 decimal point."
  TextBox5.Value = Round(((Abs(TextBox6.Value)-(Floor(Abs(TextBox6.Value))))*60), 4)
  TextBox5.Focus
  Exit Sub
     End if
     VerifyEntryCA
         
 End Sub
 '------------------------------------------------------------ 
 Sub VerifyEntryCA  
     Set objRegEx = CreateObject("VBScript.RegExp")
     objRegEx.Global = True   
     objRegEx.Pattern = "[^0123456789.-]"
     Set colMatches = objRegEx.Execute(TextBox6.Value)  
     If colMatches.Count > 0 Then
  Msgbox "You entered an invalid character."
  TextBox6.Value = Round((Abs(TextBox4.Value)+(TextBox5.Value/60)), 6)
  TextBox6.Focus
  Exit Sub
     End If
     If TextBox6.Value="" Then
      Msgbox "Do not Enter Blank"
  TextBox6.Value = Round((Abs(TextBox4.Value)+(TextBox5.Value/60)), 6)
  TextBox6.Focus
  Exit Sub 
     End if
     if ubound(split(lcase(TextBox6.Value), ".")) <=1 then        
  TextBox4.Value = Floor(Abs(TextBox6.Value))
  TextBox1.Value = TextBox4.Value
  TextBox5.Value = Round(((Abs(TextBox6.Value)-(Floor(Abs(TextBox6.Value))))*60), 4)
  TextBox2.Value = Floor(TextBox5.Value)
  TextBox3.Value = Round(((TextBox5.Value-(Floor(TextBox5.Value)))*60), 2)
  if left(Abs(TextBox6.Value), 5)<>left(TextBox6.Value, 5) then
      latSymbol1.innerhtml="S"
      latSymbol2.innerhtml="S"
  else
      latSymbol1.innerhtml="N"
      latSymbol2.innerhtml="N"
  end if
     Else     
  MsgBox "You entered More than 1 decimal point."
  TextBox6.Value = Round((Abs(TextBox4.Value)+(TextBox5.Value/60)), 6)
  TextBox6.Focus
  exit sub
     End if     
     if TextBox6.Value<>LAT then
  Lat = TextBox6.Value
  lon = TextBoxLon6.Value
  ZoomHTML
  GmapsLoad
     end if
 End Sub
  
 
 'LAT
 '------------------------------------------------------------ 
 'LON
  
 
 Sub VerifyEntryLonAA   
     Set objRegEx = CreateObject("VBScript.RegExp")
     objRegEx.Global = True   
     objRegEx.Pattern = "[^0123456789]"
     Set colMatches = objRegEx.Execute(TextBoxLon1.Value)  
     If colMatches.Count > 0 Then
         If InStr(TextBoxLon1.Value, ".") Then
             MsgBox "Do not use decimal point"
      TextBoxLon1.Value = TextBoxLon4.Value
            TextBoxLon1.Focus
             Exit Sub
         ElseIf InStr(TextBoxLon1.Value, "-") Then
             Msgbox "Do not use negative values"
      TextBoxLon1.Value = TextBoxLon4.Value
            TextBoxLon1.Focus
             Exit Sub
         Else
             Msgbox "You entered an invalid character."
      TextBoxLon1.Value = TextBoxLon4.Value
            TextBoxLon1.Focus
             Exit Sub
         End If 
     End If
     If TextBoxLon1.Value="" Then
      Msgbox "Do not Enter Blank"
         TextBoxLon1.Value = TextBoxLon4.Value
  TextBoxLon1.Focus
  Exit Sub 
     End if
     
     TextBoxLon4.Value = TextBoxLon1.Value
     TextBoxLon6.Value = Round((TextBoxLon4.Value+(TextBoxLon5.Value/60)), 6)
     VerifyEntryLonCA
     
 End Sub
 '------------------------------------------------------------ 
 Sub VerifyEntryLonAB   
     Set objRegEx = CreateObject("VBScript.RegExp")
     objRegEx.Global = True   
     objRegEx.Pattern = "[^0123456789]"
     Set colMatches = objRegEx.Execute(TextBoxLon2.Value)  
     If colMatches.Count > 0 Then
         If InStr(TextBoxLon2.Value, ".") Then
             MsgBox "Do not use decimal point"
      TextBoxLon2.Value = Floor(TextBoxLon5.Value)
             TextBoxLon2.Focus
            Exit Sub
         else 
             Msgbox "You entered an invalid character."
      TextBoxLon2.Value = Floor(TextBoxLon5.Value)
             TextBoxLon2.Focus
            Exit Sub
         End If
     End If
     If TextBoxLon2.Value="" Then
      Msgbox "Do not Enter Blank"
  TextBoxLon2.Value = Floor(TextBoxLon5.Value)
  TextBoxLon2.Focus
  Exit Sub 
     End if
     
     TextBoxLon5.Value = Round((TextBoxLon2.Value+(TextBoxLon3.Value/60)), 4)
     TextBoxLon6.Value = Round((TextBoxLon4.Value+(TextBoxLon5.Value/60)), 6)
     VerifyEntryLonCA
     
 End Sub
 '------------------------------------------------------------ 
 Sub VerifyEntryLonAC   
     Set objRegEx = CreateObject("VBScript.RegExp")
     objRegEx.Global = True   
     objRegEx.Pattern = "[^0123456789.]"
     Set colMatches = objRegEx.Execute(TextBoxLon3.Value)  
     If colMatches.Count > 0 Then
         Msgbox "You entered an invalid character."
  TextBoxLon3.Value = Round(((TextBoxLon5.Value-(Floor(TextBoxLon5.Value)))*60), 2)
         TextBoxLon3.Focus
         Exit Sub
     End If
     If TextBoxLon3.Value="" Then
      Msgbox "Do not Enter Blank"
  TextBoxLon3.Value = Round(((TextBoxLon5.Value-(Floor(TextBoxLon5.Value)))*60), 2)
  TextBoxLon3.Focus
  Exit Sub 
     End if
     if ubound(split(lcase(TextBoxLon3.Value), ".")) <=1 then 
  TextBoxLon5.Value = Round((TextBoxLon2.Value+(TextBoxLon3.Value/60)), 4)
  TextBoxLon6.Value = Round((TextBoxLon4.Value+(TextBoxLon5.Value/60)), 6)
     Else     
      MsgBox "You entered More than 1 decimal point."
  TextBoxLon3.Value = Round(((TextBoxLon5.Value-(Floor(TextBoxLon5.Value)))*60), 2)
  TextBoxLon3.Focus
      exit sub
     End if
     VerifyEntryLonCA
 End Sub
 '------------------------------------------------------------ 
 Sub VerifyEntryLonBA   
     Set objRegEx = CreateObject("VBScript.RegExp")
     objRegEx.Global = True   
     objRegEx.Pattern = "[^0123456789]"
     Set colMatches = objRegEx.Execute(TextBoxLon4.Value)  
     If colMatches.Count > 0 Then
         If InStr(TextBoxLon4.Value, ".") Then
             MsgBox "Do not use decimal point"
      TextBoxLon4.Value = Floor(Abs(TextBoxLon6.Value))
        TextBoxLon4.Focus
             Exit Sub
         ElseIf InStr(TextBoxLon4.Value, "-") Then
             Msgbox "Do not use negative values"
      TextBoxLon4.Value = Floor(Abs(TextBoxLon6.Value))
        TextBoxLon4.Focus
             Exit Sub
         else 
             Msgbox "You entered an invalid character."
             TextBoxLon4.Value = Floor(Abs(TextBoxLon6.Value))
        TextBoxLon4.Focus
             Exit Sub
         End If
     End If
     If TextBoxLon4.Value="" Then
      Msgbox "Do not Enter Blank"
  TextBoxLon4.Value = Floor(Abs(TextBoxLon6.Value))
  TextBoxLon4.Focus
  Exit Sub 
     End if
     
     TextBoxLon1.Value = TextBoxLon4.Value
     TextBoxLon6.Value = Round((TextBoxLon4.Value+(TextBoxLon5.Value/60)), 6)
     VerifyEntryLonCA
     
 End Sub
 '------------------------------------------------------------ 
 Sub VerifyEntryLonBB 
     Set objRegEx = CreateObject("VBScript.RegExp")
     objRegEx.Global = True   
     objRegEx.Pattern = "[^0123456789.]"
     Set colMatches = objRegEx.Execute(TextBoxLon5.Value)  
     If colMatches.Count > 0 Then
         Msgbox "You entered an invalid character."
  TextBoxLon5.Value = Round(((Abs(TextBoxLon6.Value)-(Floor(Abs(TextBoxLon6.Value))))*60), 4)
         TextBoxLon5.Focus
         Exit Sub
     End If
     If TextBoxLon5.Value="" Then
      Msgbox "Do not Enter Blank"
  TextBoxLon5.Value = Round(((Abs(TextBoxLon6.Value)-(Floor(Abs(TextBoxLon6.Value))))*60), 4)
  TextBoxLon5.Focus
  Exit Sub 
     End if
     if ubound(split(lcase(TextBoxLon5.Value), ".")) <=1 then     
  TextBoxLon2.Value = Floor(TextBoxLon5.Value)  
  TextBoxLon3.Value = Round(((TextBoxLon5.Value-(Floor(TextBoxLon5.Value)))*60), 2)
         TextBoxLon6.Value = Round((TextBoxLon4.Value+(TextBoxLon5.Value/60)), 6)
     Else     
      MsgBox "You entered More than 1 decimal point."
  TextBoxLon5.Value = Round(((Abs(TextBoxLon6.Value)-(Floor(Abs(TextBoxLon6.Value))))*60), 4)
  TextBoxLon5.Focus
  Exit Sub
     End if
     VerifyEntryLonCA
         
 End Sub
 '------------------------------------------------------------ 
 Sub VerifyEntryLonCA  
     Set objRegEx = CreateObject("VBScript.RegExp")
     objRegEx.Global = True   
     objRegEx.Pattern = "[^0123456789.-]"
     Set colMatches = objRegEx.Execute(TextBoxLon6.Value)  
     If colMatches.Count > 0 Then
  Msgbox "You entered an invalid character."
         TextBoxLon6.Value = Round((TextBoxLon4.Value+(TextBoxLon5.Value/60)), 6)
  TextBoxLon6.Focus
  Exit Sub
     End If
     If TextBoxLon6.Value="" Then
      Msgbox "Do not Enter Blank"
         TextBoxLon6.Value = Round((TextBoxLon4.Value+(TextBoxLon5.Value/60)), 6)
  TextBoxLon6.Focus
  Exit Sub 
     End if
 
     if ubound(split(lcase(TextBoxLon6.Value), ".")) <=1 then        
  TextBoxLon4.Value = Floor(Abs(TextBoxLon6.Value))
  TextBoxLon1.Value = TextBoxLon4.Value
  TextBoxLon5.Value = Round(((Abs(TextBoxLon6.Value)-(Floor(Abs(TextBoxLon6.Value))))*60), 4)
  TextBoxLon2.Value = Floor(TextBoxLon5.Value)
  TextBoxLon3.Value = Round(((TextBoxLon5.Value-(Floor(TextBoxLon5.Value)))*60), 2)
  if left(Abs(TextBoxLon6.Value), 5)<>left(TextBoxLon6.Value, 5) then
   LonSymbol1.innerhtml="W"
   LonSymbol2.innerhtml="W"
  else
   LonSymbol1.innerhtml="E"
   LonSymbol2.innerhtml="E"
  end if
     Else     
  MsgBox "You entered More than 1 decimal point."
         TextBoxLon6.Value = Round((TextBoxLon4.Value+(TextBoxLon5.Value/60)), 6)
  TextBoxLon6.Focus
  exit sub
     End if
      
     if TextBoxLon6.Value<>Lon then
  Lat = TextBox6.Value
  lon = TextBoxLon6.Value
  ZoomHTML
  GmapsLoad
     end if
 End Sub
 '------------------------------------------------------------ 
 Function Floor(Nb)
    'Emulate the Excel Floor Mathematical Function
     Nb = cdbl(Nb) 
     NbTmp = Round(Nb) 
     if NbTmp > Nb then 
         NbTmp = NbTmp - 1
     End if 
     Floor = cInt(NbTmp)
 End Function
 '------------------------------------------------------------ 
 Sub MagicInputButton
     'MJP's Magic Input Button
 End Sub
 '------------------------------------------------------------ 
 
 Sub LatHTML
     Lat=ReadLat.innerhtml
     a=len(Lat)
     lat=right(lat, a-16)
     a=len(Lat)
     lat=left(lat, a-6)
     y=instr(LAT, ".")
     lat = left(LAT, y+6)
     TextBox6.Value = lat
     VerifyEntryCA
 End sub
 
 '------------------------------------------------------------ 
 Sub LonHTML
     Lon=ReadLon.innerhtml
     a=len(Lon)
     Lon=right(Lon, a-16)
     a=len(Lon)
     Lon=left(Lon, a-6)
     y=instr(Lon, ".")
     Lon = left(Lon, y+6)
     TextBoxLon6.Value = Lon
     VerifyEntryLonCA
 End sub
 
 '------------------------------------------------------------ 
 Sub ZoomHTML
     Zoom=ReadZoom.innerhtml
     a=len(Zoom)
     Zoom=right(Zoom, a-17)
     a=len(Zoom)
     Zoom=left(Zoom, a-6)
     if Zoom ="" then 
         zoom=14
     else
         zoom=17-zoom
     end if
 End sub
 
 '------------------------------------------------------------ 
 'My Google Maps Code
 </SCRIPT> 
  
  
  
 <script src="[link=http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA3rPk1vKqNxviLFnWIJ-QrBRZNe1Ex5jIwPa0BHPlbhvVFMJPARQzmUQx7bXa56VyBJbp6ZPdTiarSQ]http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA3rPk1vKqNxviLFnWIJ-QrBRZNe1Ex5jIwPa0BHPlbhvVFMJPARQzmUQx7bXa56VyBJbp6ZPdTiarSQ[/link]" type="text/javascript"></script>
 <script type="text/javascript">   
    function Gmapsload()
 {
     
  var map = new GMap(document.getElementById("map"));
  map.addControl(new GMapTypeControl());
  map.addControl(new GSmallZoomControl());
  map.centerAndZoom(new GPoint(LON, LAT), ZOOM);
 
         
  var posnString = LAT ;
         document.getElementById("posnLat").innerHTML = posnString;
  var posnString = LON ;
         document.getElementById("posnLon").innerHTML = posnString;
           
         var point = new GLatLng(LAT, LON);
         var marker = new GMarker(point, {draggable: true});
         GEvent.addListener(marker, "dragstart", function() {
           map.closeInfoWindow();
         });
  
         GEvent.addListener(marker, "dragend", function() {  
         var position = marker.getPoint(); 
         map.panTo(new GLatLng(position.lat(), position.lng()));
  var posnString = position.lat();
         document.getElementById("posnLAT").innerHTML = posnString;
  var posnString = position.lng();
         document.getElementById("posnLON").innerHTML = posnString;
         });
           
 
  GEvent.addListener(map, "moveend", function() {
         var position = marker.getPoint(); 
  var posnString = position.lat();
         document.getElementById("posnLAT").innerHTML = posnString;
  var posnString = position.lng();
         document.getElementById("posnLON").innerHTML = posnString;
  LatHTML()
  LonHTML()
  });
  
         map.addOverlay(marker);
 
  GEvent.addListener(map, "zoomend", function(zoom,Newzoom) { 
    document.getElementById("posnZOOM").innerHTML=Newzoom; 
  }); 
  
 
 }
 </script>
  
  
 </head> 
 <body bgcolor=c0c0c0 onkeypress="EnterPressed"> 
  
 
 <DIV id="Main" STYLE="display:none;position:absolute"> 
 <table border=1 width=550 cellpadding=20 bgcolor=d9d9d9> 
   <tr> 
     <td> 
     <center>    
         <font face="arial" color=Red size=5><b><i> DMS Coordinates Converter  </font></b> <font color="black" size="2">By MJP 2008</font></i>
      <table border=0 cellpadding=5 bgcolor="f3f3f3">  
    <tr> 
      <td><b>Latitude</b></td><td align=left>Degrees</td><td align=left>Minutes</td><td align=left>Seconds</td>
      </tr>
   
    <tr> 
      <td>Degrees, Minutes, Seconds</td><td><input type="text" name="TextBox1" value="0" size="4" onFocusOut="VerifyEntryAA"></td><td><input type="text" name="TextBox2" value="0" size="6" onFocusOut="VerifyEntryAB"></td><td><input type="text" name="TextBox3" value="0" size="6" onFocusOut="VerifyEntryAC"><span id=latSymbol1><span></td>
    </tr>
   
    <tr> 
      <td>Degrees, Decimal Minutes</td><td><input type="text" name="TextBox4" value="0" size="4" onFocusOut="VerifyEntryBA"></td><td><input type="text" name="TextBox5" value="0" size="6" onFocusOut="VerifyEntryBB"><span id=latSymbol2><span></td><td></td>
    </tr>  
   
    <tr> 
      <td>Decimal Degrees</td><td><input type="text" name="TextBox6" value="0" size="9" onFocusOut="VerifyEntryCA"></td><td></td><td align=right><input id=runbutton1  class="button" type="button" value="Enter" name="run_button1"  onClick="MagicInputButton"></td>
    </tr>   
  </table>
     </center>
     </td> 
   </tr> 
 </table> 
 </DIV> 
 <DIV id="MainLon" STYLE="display:none;position:relative;top:220;left:0;"> 
 <table border=1 width=550 cellpadding=20 bgcolor=d9d9d9> 
   <tr> 
     <td> 
     <center>
  <table border=0 cellpadding=5 bgcolor="f3f3f3">  
    <tr> 
      <td><b>Longitude</b></td><td align=center>Degrees</td><td align=center>Minutes</td><td align=center>Seconds</td>
    </tr>
    
    <tr> 
      <td>Degrees, Minutes, Seconds</td><td><input type="text" name="TextBoxLon1" value="0" size="4" onFocusOut="VerifyEntryLonAA"></td><td><input type="text" name="TextBoxLon2" value="0" size="6" onFocusOut="VerifyEntryLonAB"></td><td><input type="text" name="TextBoxLon3" value="0" size="6" onFocusOut="VerifyEntryLonAC"><span id=lonSymbol1><span></td>
           </tr>
   
    <tr> 
      <td>Degrees, Decimal Minutes</td><td><input type="text" name="TextBoxLon4" value="0" size="4" onFocusOut="VerifyEntryLonBA"></td><td><input type="text" name="TextBoxLon5" value="0" size="6" onFocusOut="VerifyEntryLonBB"><span id=lonSymbol2><span></td><td></td>
           </tr>  
   
    <tr> 
      <td>Decimal Degrees</td><td><input type="text" name="TextBoxLon6" value="0" size="10" onFocusOut="VerifyEntryLonCA"></td><td></td><td align=right><input id=runbutton2  class="button" type="button" value="Enter" name="run_button2"  onClick="MagicInputButton"></td>
    </tr>   
  </table>
     </center>
     </td> 
   </tr> 
 </table> 
 </DIV> 
  
 <div id="map" style="width:566px; height:407px;position:absolute;top:16;left:565;" align="center"></div>
  
 <font color=c0c0c0>
 <span id=ReadLat><div id="posnLat"></div></span>
 <span id=ReadLon><div id="posnLon"></div></span>
 <span id=ReadZoom><div id="PosnZoom"></div></span>
 </font>
 </body> 
 </html> 
 
 

Click here for a live version of the code.
 
 


[image]local://11314/FD7F51340BB3430EA7D1D370DC079223.jpg[/image]
Attachment(s)Attachments are not available: Download requirements not met
 
#1
    TomRiddle

    • Total Posts : 620
    • Scores: 12
    • Reward points : 0
    • Joined: 2/7/2008
    • Location: Australia
    • Status: offline
    RE: DMS Converter Sunday, March 30, 2008 12:40 AM (permalink)
    0
    Seems to only work with IE.
     
    #2
      TNO

      • Total Posts : 2094
      • Scores: 36
      • Reward points : 0
      • Joined: 12/18/2004
      • Location: Earth
      • Status: offline
      RE: DMS Converter Sunday, March 30, 2008 5:39 AM (permalink)
      0
      Only IE supports VBS so its no wonder.
      To iterate is human, to recurse divine. -- L. Peter Deutsch
       
      #3
        scat65

        • Total Posts : 1
        • Scores: 0
        • Reward points : 0
        • Joined: 5/1/2011
        • Status: offline
        Re: RE: DMS Converter Sunday, May 01, 2011 9:54 AM (permalink)
        0
        error : gmap is undefined ?
         
        #4
          TomRiddle

          • Total Posts : 620
          • Scores: 12
          • Reward points : 0
          • Joined: 2/7/2008
          • Location: Australia
          • Status: offline
          Re: RE: DMS Converter Monday, May 02, 2011 2:39 PM (permalink)
          0
          The forum added [link tags to the API key.
          You just need to clean that line up.  
          -join([int[]][char[]]'Ut|jwXmjqq%Wzqjx'|%{[char]($_-5)})
           
          #5

            Online Bookmarks Sharing: Share/Bookmark

            Jump to:

            Current active users

            There are 0 members and 1 guests.

            Icon Legend and Permission

            • New Messages
            • No New Messages
            • Hot Topic w/ New Messages
            • Hot Topic w/o New Messages
            • Locked w/ New Messages
            • Locked w/o New Messages
            • Read Message
            • Post New Thread
            • Reply to message
            • Post New Poll
            • Submit Vote
            • Post reward post
            • Delete my own posts
            • Delete my own threads
            • Rate post

            2000-2012 ASPPlayground.NET Forum Version 3.9