diff options
author | matthew <matthew> | 2007-02-08 20:05:12 +0000 |
---|---|---|
committer | matthew <matthew> | 2007-02-08 20:05:12 +0000 |
commit | 7e815f73b81f7599a49003ee763878bf949cac74 (patch) | |
tree | 3c4fe9d6ab7c3b35fda2da8fb0201f269e080ba8 /web/js.js | |
parent | 2312b6dad38f0752d9d31ce0758c075bcf3b85d4 (diff) |
Don't use inputs unless there's a form.
Diffstat (limited to 'web/js.js')
-rw-r--r-- | web/js.js | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -140,8 +140,13 @@ var imgElCache; function cloneNode() { var img = null; if (!imgElCache) { - img = imgElCache = document.createElement('input'); - img.type = 'image'; + var form = document.getElementById('mapForm'); + if (form) { + img = imgElCache = document.createElement('input'); + img.type = 'image'; + } else { + img = imgElCache = document.createElement('img'); + } img.onclick = drag_check; img.style.position = 'absolute'; img.style.width = tilewidth + 'px'; |