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 20:44:59 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 niallp@apache.org  2005-11-01 21:44 -------
I tried your patch out in the struts-examples webapp, using IE6 and it caused a 
problem.

The Form happended to have an text input field with name="name" and the 
getAttribute("name") method returned the input field rather than the name of 
the form.

Also looking at this method - seems inconsistent to me that it used form.id to 
check the id and form.getAttributeNode("name") for the name. Maybe something 
like the following would be better:

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.getAttribute("name");
        }
    } else {
        if (form.id) {
            return form.id;
        } else {
            return form.name;
        }
    }
}

Any comments appreciated as javascript isn't my forte.

-- 
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