Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: autosubmitting a form


Message #1 by ecoleman@e... on Wed, 27 Dec 2000 15:55:18 -0000
Thanks for the reply but I've since figured it out.  Having a submit button
on the form was causing the problem.  Here's the code that works

<HTML>
<BODY onLoad="document.mainForm.submit()">
     <FORM METHOD="POST" NAME=mainForm ACTION="get_cookie.asp">
          <INPUT TYPE=HIDDEN NAME=action VALUE=again>
     </FORM>
</BODY>
</HTML>

Thanks again for the reply though.
Erik

----- Original Message -----
From: "John Covert" <john.covert@g...>
To: "javascript" <javascript@p...>
Sent: Wednesday, December 27, 2000 10:27 AM
Subject: [javascript] RE: autosubmitting a form


> EC,
>
> I believe that forms is an array in the document object.
>
> Can you state:
>
> document.mainForm.submit()
>
> ?????????
>
> John
>
>
> -----Original Message-----
> From: ecoleman@e... [mailto:ecoleman@e...]
> Sent: 12272000 10:55 AM
> To: javascript
> Subject: [javascript] autosubmitting a form
>
>
> I'm trying to autosubmit a form using javascript
> the following code causes a "object doesn't support this method" error.
> I'm using IE 5.5 running on NT.
>
> <HTML>
> <BODY onLoad="document.forms.mainForm.submit()">
> <FORM METHOD="POST" NAME=mainForm ACTION="get_cookie.asp">
> <INPUT TYPE=SUBMIT NAME=submit VALUE=ClickMe>
> <INPUT TYPE=HIDDEN NAME=action VALUE=adding>
> </FORM>
> </BODY>
> </HTML>
>
> Any help would be appreciated,
> ecoleman@e...
>
>

--- 
NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?
Visit EarthWeb for the latest in IT Management, Software Development, 
Web Development, Networking & Communications, and Hardware & Systems.  
Click on http://www.earthweb.com for FREE articles, tutorials,
and discussions from the experts.
---
You are currently subscribed to javascript as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-javascript-$subst('Recip.MemberIDChar')@p2p.wrox.com

  Return to Index