Hi, I want to submit my <form automatically from resulted jsp in struts2 using javascript at the time of page loaded. I have tried ordinary javascript but it is not working..like document.frmname.submit(),document.forms[0].submit();
Can anyone help me why it isn't working. My code:- <body> <form name="secureResponsefrm" method="post" action="http://24.practice.jad/www_new/merchantRespo.php" id="frmid"> <s:hidden name="serviceid"/> <s:hidden name="customerid"/> <s:submit name="submit" value="Submit" id="submit"/> </form> </body> <script type="text/javascript"><!-- document.forms[0].submit(); //--></script> Each time page loaded it calls the script but giving javascript error message- Error:- document.forms[0].submit is not a function //--></script> Thanks in advanced. -- View this message in context: http://www.nabble.com/Automatic-form-submission-using-javascript-in-struts2-tf4960335.html#a14207071 Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]