aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xweb/index.cgi4
-rw-r--r--web/js.js28
2 files changed, 16 insertions, 16 deletions
diff --git a/web/index.cgi b/web/index.cgi
index 90fa62741..cfe9dad47 100755
--- a/web/index.cgi
+++ b/web/index.cgi
@@ -6,7 +6,7 @@
# Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org. WWW: http://www.mysociety.org
#
-# $Id: index.cgi,v 1.53 2007-01-19 23:16:54 matthew Exp $
+# $Id: index.cgi,v 1.54 2007-01-19 23:26:32 matthew Exp $
# TODO
# Nothing is done about the update checkboxes - not stored anywhere on anything!
@@ -97,7 +97,7 @@ like graffiti, fly tipping, broken paving slabs, or street lighting</p>
EOF
$out .= '<p id="error">' . $error . 'Please try again.</p>' if ($error);
$out .= <<EOF;
-<form action="./" method="post" id="postcodeForm">
+<form action="./" method="get" id="postcodeForm">
<label for="pc">Enter a nearby postcode or street name:</label>
&nbsp;<input type="text" name="pc" value="$pc_h" id="pc" size="10" maxlength="200">
&nbsp;<input type="submit" value="Go">
diff --git a/web/js.js b/web/js.js
index 47b8a49ee..a4aac70fa 100644
--- a/web/js.js
+++ b/web/js.js
@@ -22,6 +22,11 @@ YAHOO.util.Event.onContentReady('compass', function() {
points[7].onclick = function() { pan(-tilewidth, -tileheight); return false; };
});
+YAHOO.util.Event.onContentReady('map', function() {
+ var dragO = new YAHOO.util.DDMap('map');
+ update_tiles(0, 0, false, true);
+});
+
YAHOO.util.Event.onContentReady('mapForm', function() {
this.onsubmit = function() {
this.x.value = x + 2;
@@ -30,26 +35,12 @@ YAHOO.util.Event.onContentReady('mapForm', function() {
}
});
-var in_drag;
-YAHOO.util.Event.onContentReady('drag', function() {
- var dragO = new YAHOO.util.DDMap('map');
- update_tiles(0, 0, false, true);
-});
-
// I love the global
var tile_x = 0;
var tile_y = 0;
var tilewidth = 254;
var tileheight = 254;
-function drag_check(e) {
- if (in_drag) {
- in_drag=false;
- return false;
- }
- return true;
-}
-
function image_rotate(i, j, x, y) {
var id = 't' + i + '.' + j;
var img = document.getElementById(id);
@@ -191,6 +182,15 @@ function setCursor(s) {
}
}
+var in_drag = false;
+function drag_check(e) {
+ if (in_drag) {
+ in_drag = false;
+ return false;
+ }
+ return true;
+}
+
var mouse_pos = {};
YAHOO.util.DDMap = function(id, sGroup, config) {
if (id) {