Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to stop enter key from sending a submit form

Status
Not open for further replies.

ynott

Technical User
Sep 26, 2000
49
US
Many of our users accidently hit the enter button when attempting to tab through a form. For some of the programs that they use, the enter key can be used as a tab key also. Anyway, is there a way in the asp, I'm using VBscript, to not send the form when the ENTER key is hit. The only way that I want to send the form is if the submit button is pressed.

TIA
 

ynott said:
Anyway, is there a way in the asp... to not send the form when the ENTER key is hit.

You will have to do this client-side. It cannot be done in the ASP (server-side).

I'd recommend using JavaScript, as more browsers will support this than VBScript. Of course, if you are only targetting IE, then VBScript would be just as fine.

Hope this helps,
Dan

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top