Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto-submit a form 1

Status
Not open for further replies.
Feb 4, 2002
792
GB
Does anyone know how I can suto-submit a form on a jsp page?

I want to pass 2 parameters to 2 hidden fields in a form on a 2nd page, and then submit that page to the form's action directive without the user having to press another input button.

Any ideas?

Will
 
Use JavaScript - something like :

document.theform.submit();

--------------------------------------------------
Free Database Connection Pooling Software
 
Hi Thanks for that! I eventually found some useful docs on handling forms with a bit more searching and eventually I did something like this:
Code:
...
    </form>
    <script language="JavaScript" type="text/javascript">
	document.logonForm.submit();
    </script>
    ...
    </body>
  </html>

Worked a treat! :)

Thanks for help tho.. as this is exactly as you suggested!

Will
[morning]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top