You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2006/02/23 16:07:32 UTC

DO NOT REPLY [Bug 37315] - [Validator] Javascript Validation currently uses unsupported DOM method getAttributeNode("name").

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


john@h3.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




------- Additional Comments From john@h3.com  2006-02-23 16:07 -------
Guys, there is a bug in http://svn.apache.org/viewcvs?rev=330237&view=rev (see
Comment 5). The code there, a bit different from what Jeffrey gives in Comment
4, goes:

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 {
              form.attributes["name"]; // *****PROBLEM*****
          }
      } else {
          if (form.id) {
              return form.id;
          } else {
              return form.name;
          }
      }
  }  

The problem marked above is that there is no return statement. I.e., it should be:

              return form.attributes["name"];

***** Because of this, the Javascript produces an error on IE 5.0 and 5.5.


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