commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r366458 - /jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateUtilities.js
Date Fri, 06 Jan 2006 09:19:25 GMT
Author: niallp
Date: Fri Jan  6 01:19:15 2006
New Revision: 366458

URL: http://svn.apache.org/viewcvs?rev=366458&view=rev
Log:
Fix for Bug 38159 - IE 5.0 JavaScript error - reported by Kristian L. Petersen

Modified:
    jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateUtilities.js

Modified: jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateUtilities.js
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateUtilities.js?rev=366458&r1=366457&r2=366458&view=diff
==============================================================================
--- jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateUtilities.js
(original)
+++ jakarta/commons/proper/validator/trunk/src/javascript/org/apache/commons/validator/javascript/validateUtilities.js
Fri Jan  6 01:19:15 2006
@@ -11,28 +11,32 @@
    */
   function retrieveFormName(form) {
 
-      // Please refer to Bugs 31534, 35127, 35294 & 37315
+      // Please refer to Bugs 31534, 35127, 35294, 37315 & 38159
       // for the history of the following code
 
+      var formName;
+
       if (form.getAttributeNode) {
           if (form.getAttributeNode("id") && form.getAttributeNode("id").value) {
-              return form.getAttributeNode("id").value;
+              formName = form.getAttributeNode("id").value;
           } else {
-              return form.getAttributeNode("name").value;
+              formName = form.getAttributeNode("name").value;
           }
       } else if (form.getAttribute) {
           if (form.getAttribute("id")) {
-              return form.getAttribute("id");
+              formName = form.getAttribute("id");
           } else {
-              form.attributes["name"];
+              formName = form.attributes["name"];
           }
       } else {
           if (form.id) {
-              return form.id;
+              formName = form.id;
           } else {
-              return form.name;
+              formName = form.name;
           }
       }
+
+      return formName;
 
   }  
 



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