diff options
author | Matěj Cepl <mcepl@redhat.com> | 2010-03-05 20:13:03 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2010-03-05 20:13:03 +0100 |
commit | c08add1575c2899641188561fc0970d9b8f94302 (patch) | |
tree | 6554ee1294ca7ac45d451c6182aaa8d4de94a755 /offline-submit/collect-inputs.js | |
parent | fcca737f372432da3d9bdb3f3ec1ee0eac6abe69 (diff) | |
download | bugzilla-triage-c08add1575c2899641188561fc0970d9b8f94302.tar.gz |
Remove unnecessary junk
Diffstat (limited to 'offline-submit/collect-inputs.js')
-rw-r--r-- | offline-submit/collect-inputs.js | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/offline-submit/collect-inputs.js b/offline-submit/collect-inputs.js deleted file mode 100644 index d6a2b47..0000000 --- a/offline-submit/collect-inputs.js +++ /dev/null @@ -1,45 +0,0 @@ -bzPage.prototype.collectInputs = function (form) { - -// form.elements array of all controls ... no, forEach though -// INPUT, SELECT, TEXTAREA, and BUTTON -// each interesting control of them have NAME and VALUE -// You can access a particular element by using either an index or the element name or id. -// -// https://developer.mozilla.org/en/DOM/form -// form.elements.querySelectorAll("*[name]") - - var x=this.dok.getElementById("myForm"); -for (var i=0;i<x.length;i++) -{ -document.write(x.elements[i].value + ", " + x.elements[i].tagName + ", " + x.elements[i].name); -document.write("<br />"); -} - -} - -// INTERESTING: http://www.quirksmode.org/js/forms.html - -// Example onsubmit handler - -function checkscript() { - if (some value is/is not something) { - // something is wrong - alert('alert user of problem'); - return false; - } - else if (another value is/is not something) { - // something else is wrong - alert('alert user of problem'); - return false; - } - - // If the script makes it to here, everything is OK, - // so you can submit the form - - return true; -} - -// with XPCNativeWrappers you cannot use document.formname.inputname.value -var form = document.forms.namedItem("gs"); -var input = form.elements.namedItem("q"); -var q = input.value; |