SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
Thread: automatic submit.form
-
Feb 27, 2003, 22:04 #1
- Join Date
- Jun 2002
- Location
- Buenos Aires, Argentina
- Posts
- 361
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
automatic submit.form
I have a form, pointing to a CGI. All the form fields are hidden, and I need to make the form submiting automatically as the page loads. Look
-------------------------
<form id="aForm" method="POST" action="/cgi-bin/formtomail.cgi" onSubmit="doSubmit(this.form)">
<input type="hidden" name="subject" value="Comentario para la FADM">
<input type="hidden" name="recipient" value="pepe@parada.com">
<input type="hidden" name="redirect" value="apage.htm">
<input type="hidden" name="mail" value=pepe@hotmail.com">
</form>
Now, I need to make the form submit, but without any button. I was told by a friendly poster that something like..
<script type="text/javascript">
form.submit()
</script>
Should work, but it tells me that the object "form" is not present. There should be a formulae.
Thanx.My SOHO: http://www.contactopuro.com.ar
-
Feb 27, 2003, 23:12 #2
Bookmarks