From 83ffacea2e30190d600c88f276e1173df63410c6 Mon Sep 17 00:00:00 2001 From: matthew Date: Thu, 19 Jul 2007 14:00:51 +0000 Subject: Fix IE id/name bug; only do it if button present. --- web/js.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'web/js.js') diff --git a/web/js.js b/web/js.js index 89e2567f1..760a8896b 100644 --- a/web/js.js +++ b/web/js.js @@ -10,7 +10,7 @@ */ YAHOO.util.Event.onContentReady('pc', function() { - if (this.value == this.defaultValue) { + if (this.id && this.value == this.defaultValue) { this.focus(); } }); @@ -45,8 +45,10 @@ YAHOO.util.Event.onContentReady('map', function() { YAHOO.util.Event.onContentReady('mapForm', function() { this.onsubmit = function() { - this.submit_problem.disabled = true; - this.submit_map.value = 2; + if (this.submit_problem) { + this.submit_problem.disabled = true; + this.submit_map.value = 2; + } this.x.value = x + 2; this.y.value = y + 2; return true; -- cgit v1.2.3