Click here to Skip to main content
15,886,639 members
Please Sign up or sign in to vote.
4.67/5 (2 votes)
See more:
Hi All How can I force a submit in a classic asp form. When I call my asp page as follows:

http//<fileserver>/Allscripts2.asp?txtacctnNum=111111&txtMrn=99999

My asp page has the following

<FORM method=POST name="form1">
<INPUT type="hidden" name="txtacctNum" value=Request.QueryString("txtacctNum") >
<INPUT type="hidden" name="txtMRN" value=Request.QueryString("txtMRN")>



<INPUT type="submit" >
</form>

I don't want the users to click submit. I want the script to run automatically.

Any ideas.

I'm new to this so I'm learning apprecaite any ideas or code examples.

Thanks
Jose'

Posted

1 solution

Hi,
use this code below.
<script type="text/javascript">
  document.forms['form1'].submit();
</script>


this will force submit the form. Hope this will help.
 
Share this answer
 
Comments
Jose Garcia 28-Feb-11 10:25am    
Great works like a charm thanks for the help. Hopefully some day I can return the favor.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900