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

Making keyboard enter (carriage return) send or submit form

Status
Not open for further replies.

bazil2

Technical User
Feb 15, 2010
148
DE
(Elementary user)

I have a simple HTML page (form post) with a single input field and a send button.

Is it possible that once the user has entered a value in the input field and hits 'Enter' (carriage return) on the keyboard, that it does the same as depressing the send (submit) button on the HTML page?

Many thanks for any help.

 
Assuming you use a submit button that is the default behaviour for browsers.
 
Well the button code is:

<button id="send" style="position:relative; top:40px;">Send</button>

Are you able to enlighten me with any code that would do this?

Best regards
 
Code:
<input type="submit" name="xSubmit" value="Send" style="position:relative; top:40px;" id="send" />
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top