HighDots Forums  

Automatic onLoad Form Submission on One of Two Forms on Single HTML Doc

JavaScript discussion (multi-lingual) JavaScript discussion (alt.comp.lang.javascript)


Discuss Automatic onLoad Form Submission on One of Two Forms on Single HTML Doc in the JavaScript discussion (multi-lingual) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Shawn Wilson
 
Posts: n/a

Default Re: Automatic onLoad Form Submission on One of Two Forms on Single HTML Doc - 08-29-2005 , 04:53 PM






untested, and I'm not expert... but wouldn't this work?

<body onload="secondform.submit()">


----------
Shawn Wilson

"Fred" <x@x.com> wrote

Quote:
Let's say I had a single HTML page with two individual forms on it.

Each form had its own search button named like this

input type="submit" name="firstform" value="A"

And

input type="submit2" name="secondform" value="B"


How would I implement a onLoad event so that the form button named
"secondform" would send its data automatically when the page loads?

Thanks very much for your help







Reply With Quote
  #2  
Old   
Fred
 
Posts: n/a

Default Automatic onLoad Form Submission on One of Two Forms on Single HTML Doc - 08-29-2005 , 07:45 PM







Let's say I had a single HTML page with two individual forms on it.

Each form had its own search button named like this

<input type="submit" name="firstform" value="A">

And

<input type="submit2" name="secondform" value="B">


How would I implement a onLoad event so that the form button named
"secondform" would send its data automatically when the page loads?

Thanks very much for your help





Reply With Quote
  #3  
Old   
Fred
 
Posts: n/a

Default Re: Automatic onLoad Form Submission on One of Two Forms on Single HTML Doc - 08-29-2005 , 11:17 PM



Thanks Shawn I'll give it a try


Mon, 29 Aug 2005 21:53:20 GMT, "Shawn Wilson" <shawnw (AT) dvigroup (DOT) net>
wrote:

Quote:
untested, and I'm not expert... but wouldn't this work?

body onload="secondform.submit()"


----------
Shawn Wilson

"Fred" <x@x.com> wrote in message
news:bha7h1dbh8nc5d73guktmeovh0ep23fk6i (AT) 4ax (DOT) com...

Let's say I had a single HTML page with two individual forms on it.

Each form had its own search button named like this

input type="submit" name="firstform" value="A"

And

input type="submit2" name="secondform" value="B"


How would I implement a onLoad event so that the form button named
"secondform" would send its data automatically when the page loads?

Thanks very much for your help







Reply With Quote
  #4  
Old   
Fred
 
Posts: n/a

Default Re: Automatic onLoad Form Submission on One of Two Forms on Single HTML Doc - 08-30-2005 , 01:45 PM



Nope,
I could not get it to work...





On Mon, 29 Aug 2005 21:17:34 -0700, Fred <x@x.com> wrote:

Quote:
Thanks Shawn I'll give it a try


Mon, 29 Aug 2005 21:53:20 GMT, "Shawn Wilson" <shawnw (AT) dvigroup (DOT) net
wrote:

untested, and I'm not expert... but wouldn't this work?

body onload="secondform.submit()"


----------
Shawn Wilson

"Fred" <x@x.com> wrote in message
news:bha7h1dbh8nc5d73guktmeovh0ep23fk6i (AT) 4ax (DOT) com...

Let's say I had a single HTML page with two individual forms on it.

Each form had its own search button named like this

input type="submit" name="firstform" value="A"

And

input type="submit2" name="secondform" value="B"


How would I implement a onLoad event so that the form button named
"secondform" would send its data automatically when the page loads?

Thanks very much for your help







Reply With Quote
  #5  
Old   
Shawn Wilson
 
Posts: n/a

Default Re: Automatic onLoad Form Submission on One of Two Forms on Single HTML Doc - 08-31-2005 , 02:34 PM



Sorry, I was just guessing...

--------
Shawn Wilson

"Fred" <x@x.com> wrote

Quote:
Nope,
I could not get it to work...





On Mon, 29 Aug 2005 21:17:34 -0700, Fred <x@x.com> wrote:

Thanks Shawn I'll give it a try


Mon, 29 Aug 2005 21:53:20 GMT, "Shawn Wilson" <shawnw (AT) dvigroup (DOT) net
wrote:

untested, and I'm not expert... but wouldn't this work?

body onload="secondform.submit()"


----------
Shawn Wilson

"Fred" <x@x.com> wrote in message
news:bha7h1dbh8nc5d73guktmeovh0ep23fk6i (AT) 4ax (DOT) com...

Let's say I had a single HTML page with two individual forms on it.

Each form had its own search button named like this

input type="submit" name="firstform" value="A"

And

input type="submit2" name="secondform" value="B"


How would I implement a onLoad event so that the form button named
"secondform" would send its data automatically when the page loads?

Thanks very much for your help









Reply With Quote
  #6  
Old   
Jasen Betts
 
Posts: n/a

Default Re: Automatic onLoad Form Submission on One of Two Forms on Single HTML Doc - 10-15-2005 , 07:21 AM



On 2005-08-30, Fred <x@x.com> wrote:
Quote:
Let's say I had a single HTML page with two individual forms on it.

Each form had its own search button named like this

input type="submit" name="firstform" value="A"

And

input type="submit2" name="secondform" value="B"


How would I implement a onLoad event so that the form button named
"secondform" would send its data automatically when the page loads?
you submit the form, not the button.

since the submit causes the brower to load a new page, what purpose does the
first form have? is it for users with javascript disabled ?

as you have it the second is a text field in any case, not a button.



Bye.
Jasen


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.