471,091 Members | 1,553 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,091 software developers and data experts.

Automatic postback for a form?

Hi,

My question is how I can send a form without having to push on a submit
button? I need to send a form with method post just by loading the hidden
textboxes and send them right away. Anyone got the anser?

Thx
Jul 23 '05 #1
3 3975
Fred Geurtsen wrote on 15 dec 2004 in comp.lang.javascript:
My question is how I can send a form without having to push on a
submit button? I need to send a form with method post just by loading
the hidden textboxes and send them right away. Anyone got the anser?


document.forms.myForm.submit()

Dat had je ook wel op kunnen zoeken!
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 23 '05 #2
Dank je Evertjan...dit gaat toch veel sneller zo!

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
Fred Geurtsen wrote on 15 dec 2004 in comp.lang.javascript:
My question is how I can send a form without having to push on a
submit button? I need to send a form with method post just by loading
the hidden textboxes and send them right away. Anyone got the anser?


document.forms.myForm.submit()

Dat had je ook wel op kunnen zoeken!
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Jul 23 '05 #3
"Fred Geurtsen" <f.********@simstones.nl> wrote in message
news:41*********************@reader2.nntp.hccnet.n l...
Hi,

My question is how I can send a form without having to push on a submit button? I need to send a form with method post just by loading the hidden textboxes and send them right away. Anyone got the anser?


<head>
<script type="text/javascript">
window.onload = function() {
document.forms['myForm'].submit();
}
</script>
</head>
<body>
<form name="myForm">

or

<body onload="document.forms['myForm'].submit();">
<form name="myForm">

Most user agents will present the user with a prompt asking them if they
really want to submit the form. No, there is no way to get around that.

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Matt | last post: by
3 posts views Thread by Matthew Louden | last post: by
1 post views Thread by Rhys | last post: by
21 posts views Thread by Martin Eyles | last post: by
11 posts views Thread by antonyliu2002 | last post: by
4 posts views Thread by Harry | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.