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 38159] New: - validation in MSIE5.0
Date Fri, 06 Jan 2006 08:51:32 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=38159>.
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=38159

           Summary: validation in MSIE5.0
           Product: Commons
           Version: unspecified
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Validator
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: crap@linddata.dk


Version : commons-validator-1.2.0

The validation in MSIE5.0 failed with errors like :

A Runtime error has occurred.
Do you wish to Debug ?
Line: 1361
Error: Expected ';'

To solve this error I have changed the method retrieveFormName in
validateUtilities.js from :

function retrieveFormName(form) {
  // Please refer to Bugs 31534, 35127, 35294 & 37315
  // for the history of the following code
  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 {
        form.attributes["name"];
     }
  } else {
     if (form.id) {
        return form.id;
     } else {
        return form.name;
     }
  }
}  

to

function retrieveFormName(form) {
  var x;
  if (form.getAttributeNode) {
     if (form.getAttributeNode("id") && form.getAttributeNode("id").value) {
        x = form.getAttributeNode("id").value;
     } else {
       x = form.getAttributeNode("name").value;
     }
  } else if (form.getAttribute) {
     if (form.getAttribute("name")) {
       x = form.getAttribute("name");
     } else {
       x =  form.getAttribute("id");
     }
  } else {
     if (form.id) {
       x =  form.id;
     } else {
       x =  form.name;
    }
  }
  return x;
}

This solution is tested on : 
FireFox 1.5
MSIE 5.00.3502.1000
MSIE 6.0.2900.xpsp_sp2_gdr.050301-1519
Netscape 8.0.4

Regrads 

Kristian L. Petesen

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