Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Using submit with JavaScript


Message #1 by "Martin Johansson" <mmttjj@h...> on Tue, 13 Mar 2001 22:25:27
Martin ---

Anytime you press a submit button, the form containing that form can be
obtained by calling this.form.  So when you press the button, you can write
the following as part of the submit tag

onClick="this.form.submit();"

That will submit the form corresponding to the submit button pressed.

Michael

----- Original Message -----
From: "Martin Johansson" <mmttjj@h...>
To: "javascript" <javascript@p...>
Sent: Wednesday, March 14, 2001 2:16 AM
Subject: [javascript] Using submit with JavaScript


> On a page, I have not just one, lots of forms. If i use document.forms
> [0].submit() it will just submit the first form, right? I have some text
> written in a menu, and you can't make text post a form in any other way
> than using Java, so i really need help with this. Let's proceed. What i
> need is a way for text to sumbit a specified form, not just the first on
> the webpage. Got that? =) Well...hundreds of millions of thanks to the
> person who can help me out! =)


  Return to Index