PDA

View Full Version : Submitting Forms Automatically


Lancaster
09-25-2005, 04:33 PM
Hello, I have some hidden forms that store variables about my users but rather than have them press a submit button... is it possible for this to happen automatically when the page loads?

birdbrain
09-25-2005, 05:08 PM
Hi Lancaster,

Try this example, it uses google to test the submission

<body onload="setInterval('document.forms[0].submit()',5000)">

<div>There is a hidden form on this page it will submit to google.com after 5 seconds.</div>

<form action="http://www.google.com" method="get">
<div>
<input type="hidden" name="foo" value="blah">
<div>
</form>

</body>