Automatic form submition...

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Automatic form submition...

Post by JellyFish »

Hello, as the title says, I need to know if there is a way to "automatically" submit a form after the script has been fully loaded?

I need this because I have a back-end script that takes all the data from a previous form and does what it does with it, then, using the meta tag, redirects you back to the first form(this is currently what I have). So if there is a input tag that looks something like:

<input type='submit/auto' name='submit'>

surely this isn't the exact tag but something similar would work, as long as it redirects you to a page with all the form data, using the get method, automatically, then that's what I need.

That's pretty much it. Thanks.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

You probably want to use the onLoad event in the <body> tag. Something like:

Code: Select all

<body onLoad="document.myform.submit();">
(#10850)
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Post by JellyFish »

Thanks, but it's okay. I figured that I'd just put the var in the url of the meta redirect tag.

End topic.
Post Reply