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 27899] New: - Javascript validation doesn't work if a form field is called "name"
Date Wed, 24 Mar 2004 10:34:09 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=27899>.
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=27899

Javascript validation doesn't work if a form field is called "name"

           Summary: Javascript validation doesn't work if a form field is
                    called "name"
           Product: Commons
           Version: Nightly Builds
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Validator
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: apache@carlos.cousas.net


The last commit of the javascript code allows multiple forms on the same page 
by generating a unique variable name based on form name, adding this line

oMinLength = eval('new ' + form.name + '_minlength()');

But if any field of the form is called "name" javascript validation doesn't 
work as form.name is an object, not a String

For example <html:text property="name"/> makes client side validation stop 
working

Affected files:
Jakarta-commons/validator/src/javascript/org/apache/commons/validator/javasc
ript/*.js

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