source: trunk/npemap.org.uk/static/go/index.html @ 526

Last change on this file since 526 was 526, checked in by Nick Burch, 13 years ago

Handle spaces in urls

  • Property svn:eol-style set to native
File size: 1.9 KB
Line 
1<!--#set var="title" value="New Popular Edition Maps" -->
2<!--#set var="link" value="/go/" -->
3<!--#include virtual="../inc/header.shtml" -->
4<script src="/tiles/yahoo.js" type="text/javascript"></script> 
5<script src="/tiles/dom.js" type="text/javascript"></script> 
6<script src="/tiles/event.js" type="text/javascript"></script> 
7<script src="/tiles/jsr_class.js" type="text/javascript"></script> 
8<script src="/tiles/jscoord-1.1.1.js" type="text/javascript"></script> 
9<script src="/tiles/prototype.js" type="text/javascript"></script>
10<script src="/find.js" type="text/javascript"></script> 
11<script src="/indexPage.js" type="text/javascript"></script> 
12
13<script type="text/javascript">
14// Change the base URL
15ROOTURL = "../";
16
17function pageLoaded() {
18        var whereBox = document.getElementById("where");
19
20        // Was there anything passed in in the url?
21        if(document.location.href.indexOf("?") > -1) {
22                var loc = document.location.href.substring(document.location.href.indexOf("?")+1);
23                // Decode
24                loc = loc.replace(/%20/g, " ");
25
26                if(loc.length) {
27                        // Use this as the location, and search
28                        whereBox.value = loc;
29                        find();
30                }
31        }
32}
33
34YAHOO.util.Event.onAvailable("where", pageLoaded);
35</script>
36
37<div id="body">
38
39<h1>Go where?</h1>
40<form name="go" onsubmit="return find()" action="">
41<p>
42<script type="text/javascript">
43document.write(' <label for="where">You can search our maps by place name, by latitude and longitude, by grid reference, and by postcode:</label><br/><input id="where" name="where" /> <input type="submit" name="Zoom To" value="Go" />');
44</script>
45</p>
46
47<div id="geonames_results_window">
48  <div class="close"><a href="javascript:hideGeonamesPopup()" title="close">X</a></div>
49  <div id="geonames_results"></div>
50</div>
51<span class="terms">Place functionality by <a href="http://www.geonames.org/">Geonames</a>.</span>
52</form>
53</div>
54
55</div>
56<!--#include virtual="../inc/footer.shtml" -->
Note: See TracBrowser for help on using the repository browser.