Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
None
-
Operating System: other
Platform: Other
-
38159
Description
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)
else
{ return form.getAttributeNode("name").value; } } else if (form.getAttribute) {
if (form.getAttribute("id"))
else
{ form.attributes["name"]; } } else {
if (form.id)
else
{ return form.name; } }
}
to
function retrieveFormName(form) {
var x;
if (form.getAttributeNode) {
if (form.getAttributeNode("id") && form.getAttributeNode("id").value)
else
{ x = form.getAttributeNode("name").value; } } else if (form.getAttribute) {
if (form.getAttribute("name"))
else
{ x = form.getAttribute("id"); } } else {
if (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