Click to See Complete Forum and Search --> : submit data automatically once the page is loaded?


lting
01-12-2004, 02:33 AM
can i force a page to submit something when it is opened or loaded?


<body onload?????


for example .. i passed have a page PAGEA.php and another page named PAGEB.php ..


i pass a value to PAGEB.php though button,

when the PAGEB is opened it automatically help me to submit a data to a form. can do that?

this is to prevent pressing the submit button in PAGEB.php in order to get some informations from database ..


anyidea how to do it?

Kor
01-12-2004, 04:39 AM
yes, even I don't see why you may need it...

<body onload="document.form's_name.submit()">

or meybe is a better ideea to fire the submit when the last HTML code lines are loaded

.
.
<script>window.onload = document.form's_name.submit()</script>
</body>

lting
01-12-2004, 07:11 PM
emm not working .. i paste my coding here see whether it is correct or not


suppose the windows will auto submit and show me the employment history without pressing ok ..

but now it seem like keep refreshing when the page is loaded ..

lting
01-12-2004, 07:21 PM
emm oh yupp

now i remember ..

i have many submit buttons ..

so when it is onloaded .. how to assign only one specified submit button will auto submit to the form?

Kor
01-13-2004, 03:01 AM
You don't assign a button... you assign a form (if you said you have multimple buttons I presume you have multiple forms also), so it is enough to specify which form (using the form's name or order) is to be submitted....