Click to See Complete Forum and Search --> : form submission
red96talon
10-09-2003, 10:51 PM
AAGGHH!! I'm gonna go nuts! So I'm sitting here and going through my Javascript:Premium Edition book and I'm tearing my hair out. Javascript makes me nautious. I'm trying to get a form to automatically submit as soon as the page loads. I've tried onLoad commands both in the BODY tag and the SUBMIT tags. I've tried click() everywhere to get it to act like the submit button was clicked. What am I doing wrong?
~dan
Khalid Ali
10-09-2003, 11:22 PM
make your body tag something like this
<body onload="SubmitForm();">
make sure you have a html form in the body of the document.
ANd there has to be an action attribute present in form element with a valid URI
then make your js function look like this
function SubmitForm(){
document.formName.submit()
}
red96talon
10-09-2003, 11:45 PM
Khalid...
you're my hero!!!!!!!!!!!!!!!!! Thank you oh so much. Now I can form-bomb some bastards who won't stop emailing me. I'm gonna let the page reload all through the night.....
are the Flames gonna do any good this year?