source: trunk/npemap.org.uk/static/tiles/allmaps.html @ 58

Last change on this file since 58 was 58, checked in by David Sheldon, 15 years ago

More IE integration. Need to use the Yahoo event model.

File size: 699 bytes
Line 
1
2<html>
3<head>
4  <title>England and Wales maps</title>
5</head>
6<script src="yahoo.js"></script> 
7<script src="dom.js"></script> 
8
9<body>
10<p>
11Click on the map to zoom in.
12</p>
13<a href="#" id="link">
14<img src="thumbnail.jpg" style="border: none" />
15</a>
16</body>
17
18<script type="text/javascript">
19function click(e) {
20  e = (e)?e:event;
21  var img = (e.target)?e.target:e.srcElement;
22        var x = e.pageX - img.offsetLeft;
23        var y = img.height-(e.pageY - img.offsetTop);
24
25        var s6x = Math.round(x/6);
26        var s6y = Math.round(y/6);
27
28        window.location=("map.html?" + s6x + "," + s6y + ",3");
29
30        return false;
31}
32
33        var link = document.getElementById("link");
34
35        link.onclick = click;
36        link.href='#';
37
38</script>
39
40</html>
Note: See TracBrowser for help on using the repository browser.