I don't see any problem with your code on first sight. Do you have more than one form in the page? Is the page you're trying to
Submit is the first one in the page? Try putting the name of the form instead of forms[0].submit do Document.<name-of-your-form>.submit(); And also, in your onclick="..." do just onclick="callSumbit();" (remove the 'javascript' token. If it still gives you errors give us the error log so it would be easier to Help you. Hope this helps, Erez -----Original Message----- From: sachin [mailto:[EMAIL PROTECTED] Sent: Saturday, October 09, 2004 5:29 PM To: Struts Users Mailing List Subject: help : submit with javascript problem hello all , i have a struts form and a button outside the form. on button click , with javascript i need the submit the form any help is welcome. My code is like following. but does not work <html:form action="/something.do"> .... </html:form> <input type="button" onClick="javascript:callSubmit()"> <script> function callSubmit() { document.forms[0].submit(); } </script> Sachin Hegde --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]