changeset 4356:361c6d95ebf3

fix dbw_hide_buttons javascript
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 28 Sep 2008 17:28:08 +0200
parents b3602f5e2038
children 1f7b0a55955b
files wiki/htdocs/common/js/common.js
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/wiki/htdocs/common/js/common.js	Sun Sep 28 15:59:46 2008 +0200
+++ b/wiki/htdocs/common/js/common.js	Sun Sep 28 17:28:08 2008 +0200
@@ -295,14 +295,17 @@
 function dbw_hide_buttons() {
     var form;
     var elem;
+    var name;
 
     for (var fidx = 0; fidx < document.forms.length; fidx++) {
         form = document.forms[fidx];
         for (var eidx = 0; eidx < form.elements.length; eidx++) {
             elem = form.elements[eidx];
             name = elem.name;
-            if (name.substr(0,4) == 'dbw.' && name.substr(-7) == '.submit')
-                elem.style.display = 'none';
+            if (name) {
+                if (name.substr(0,4) == 'dbw.' && name.substr(-7) == '.submit')
+                    elem.style.display = 'none';
+            }
         }
     }
 }