You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Matt Cox <m....@niteo.com> on 2003/04/04 02:28:00 UTC

Anyone else have this problem

When using the <html:submit /> tag in conjuction with <a href="javascript:document.forms[0].submit();"> on the same page, the second method of submitting a form does not work.  Remove the <html:submit/> and the latter method works fine.  The html outputted by the <html:submit/> is <input type="submit" name="submit">.  This causes a naming conflict in JavaScript where it gets confused between the submit field and the submit() method.  odd.

Re: Anyone else have this problem

Posted by Nicolas De Loof <ni...@cgey.com>.
use <html:submit property="foo" />

This will output :
<input type="submit" name="foo"> and your javascript will work.

Nico.


When using the <html:submit /> tag in conjuction with <a href="javascript:document.forms[0].submit();"> on the same
page, the second method of submitting a form does not work.  Remove the <html:submit/> and the latter method works fine.
The html outputted by the <html:submit/> is <input type="submit" name="submit">.  This causes a naming conflict in
JavaScript where it gets confused between the submit field and the submit() method.  odd.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org