HighDots Forums  

Form submit on load

Javascript JavaScript language (comp.lang.javascript)


Discuss Form submit on load in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Hans Recter
 
Posts: n/a

Default Form submit on load - 09-20-2003 , 10:58 PM






Hi

I have a form with hidden fields that gather information from another form.

I would like this form to submit itself as soon as it is loaded.
Can anyone tell me if it is possible to do this and if so how?

Thanks in advance
Hans Recter




Reply With Quote
  #2  
Old   
Stuart Palmer
 
Posts: n/a

Default Re: Form submit on load - 09-21-2003 , 02:08 AM






don't get why you'd wanna do it but it would be something like:-

<body onload="document.MyForm.submit();">

doesn't seem to work in NS 4.75 though or defo won't work for non JS users.

Stu

"Hans Recter" <hrsoftware (AT) hotmail (DOT) com> wrote

Quote:
Hi

I have a form with hidden fields that gather information from another
form.

I would like this form to submit itself as soon as it is loaded.
Can anyone tell me if it is possible to do this and if so how?

Thanks in advance
Hans Recter






Reply With Quote
  #3  
Old   
Hans Recter
 
Posts: n/a

Default Re: Form submit on load - 09-21-2003 , 05:40 AM



I want to use the Pay Pal shopping cart on my site. The button and code they
provide create a form with hidden fields to link to your cart. I am using a
DHTML menu system on my site which will only point to a URL or run a
JavaScript command and I want to use it to open the cart.
My thought was to open a page with the hidden fields and have it submit
automatically. Maybe there is a better way?
Hans Recter

"Stuart Palmer" <tryandspamme (AT) youcant (DOT) com> wrote

Quote:
don't get why you'd wanna do it but it would be something like:-

body onload="document.MyForm.submit();"

doesn't seem to work in NS 4.75 though or defo won't work for non JS
users.

Stu

"Hans Recter" <hrsoftware (AT) hotmail (DOT) com> wrote in message
news:3f6d21f4$1 (AT) news (DOT) iconz.co.nz...
Hi

I have a form with hidden fields that gather information from another
form.

I would like this form to submit itself as soon as it is loaded.
Can anyone tell me if it is possible to do this and if so how?

Thanks in advance
Hans Recter








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.