You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2002/06/04 02:59:02 UTC

DO NOT REPLY [Bug 9594] New: - html:submit without property attribute causes JavaScript error with form[...].submit();

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9594>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9594

html:submit without property attribute causes JavaScript error with form[...].submit();

           Summary: html:submit without property attribute causes JavaScript
                    error with form[...].submit();
           Product: Struts
           Version: 1.1 Beta 1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Custom Tags
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: btomasini@neteverything.com


If the attribute property is not set on an html:submit tag, the taglib renders
the html as <input type="submit" name="submit"...

In this case, when calling the method "document.form[0].submit();" from
JavaScript in Netscape, you will get the error "document.form[0].submit is not a
method".

If the form object has an element named "submit", that element takes precednet
over the submit() method.  Therefore, the above javascript is referencing an
object, not a method.

The workaround is to add the attribute property="btnSubmit" to the html:submit tag.

A better resolution would be to omit the name="" HTML from the input tag when
the property attribute is not set in the taglib.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>