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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript method to handle enter key 1

Status
Not open for further replies.

WIREMESH

Programmer
Mar 15, 2004
109
US
I have an asp.net 2.0 web application written in vb

I have several textbox controls on a form that gather numeric data. I have 2 multiline textbox controls that enable the user to enter multiline text.

When then user presses the enter while entering data into any of the textbox controls that are using to get numeric data, the form posts back. I want to disable this behavior.

However, when they enter text into the multi-line textbox I want the control to handle the enter by skipping to the next line.

I have seen several javascript functions that capture the enter key. The problem is, I cannot hit enter into the multiline textbox control where the enter is is approriate.

Is there a simple javascript method I can use without using having to integrate any 3rd party ajax libraries?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top