Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] make CGI not respond to Enter


  • From: javascript@xxxxxxxxxx (Dan Costea)
  • Subject: [Javascript] make CGI not respond to Enter
  • Date: Wed, 20 Feb 2002 20:24:33 +0100

> Is there anything in JavaScript to prevent a form being submitted on
> pressing Enter on a text entry?
>
> TIA
>
> Garry
>

I can give you a solution, but just for all text entry (not just for one):
you don't provide an "submit" type button, but a "button" type button. For
example:

<form id="myForm" action="doAction" method="POST">
 <input type="text" name="param1" value="param1"/>
 <input type="text" name="param2" value="param2"/>
 <input type="text" name="param3" value="param3"/>
 <input type="button" value="Submit" onClick="myForm.submit ()"/>
</form>



Dan.