commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37315] - [Validator] Javascript Validation currently uses unsupported DOM method getAttributeNode("name").
Date Tue, 01 Nov 2005 22:58:56 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37315>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37315





------- Additional Comments From jwilliams@judcom.nsw.gov.au  2005-11-01 23:58 -------
I tested your suggestion in IE 5 and it failed when it had a input field with
name="name".

I made a slight change and tested in IE 5,6, and latest firefox and it appears
to work fine:

  function retrieveFormName(form) {

    if (form.getAttributeNode) {
        if (form.getAttributeNode("id") &&
            form.getAttributeNode("id").value) {
            return form.getAttributeNode("id").value;
        } else {
            return form.getAttributeNode("name").value;
        }
   } else if (form.getAttribute) {
        if (form.getAttribute("id")) {
            return form.getAttribute("id");
        } else {
            return form.attributes["name"];
        }
    } else {
        if (form.id) {
            return form.id;
        } else {
            return form.name;
        }
    }
}



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message