I think this is a result of browser confusion between an 
element named 'submit' (the element produced by an html:submit 
without a property attribute)
and the function form.submit();
When using html:submit always specify a property.
Then you can have a named request parameter to process.

Interestingly, if you use html:cancel you may not specify a property
or it ceases to be cancel button (overriding validation).
One can specify a value, but then that value appears on the button
which is inconvenient for internationalized sites.

We ended up using custom tags that create <button> elements
that use onsubmit to add innerHTML to the form.
The innerHTML added is a hidden input named with the Struts
cancel property and given a value picked up in our parent action class
and targeted to a list of common forward names: 'back' 'cancel' 'home'
etc. 

Toby Steel

-----Original Message-----
From: Gary Bartlett [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 22, 2002 3:17 PM
To: StrutsUser Maillist
Subject: <html:submit> causes errors with javascript form submit


Just curious - does anybody use the html:submit tag,
or do folks generally just use the standard input
type=submit tag.  

The reason I ask is that html:submit does not allow
you to  specify the name of the button - and as a
result all buttons generated with that tag are named
'submit'.  

This has the effect of returning an error if you try
to use javascript to submit your form (via
this.form.submit() ) - which can be a real PITA to
debug.

Gary Bartlett

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to