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

Hit Enter On Keyboard To Submit Form

Status
Not open for further replies.

FontanaS

Programmer
Joined
May 1, 2001
Messages
357
Location
US
Hi!

For some reason when the user hits "enter" on their keyboard after filling out the form, the page refershes and the data is lost.

When the user hits "enter" on their keyboard, I would like the same thing to happen as if they clicked on the "submit" button (which would be do do the code under that section).

I thought that when the user hit "enter" on their keyboard it always acts as a submit.

Is there code that will fix this? I know that the users will hit the "enter" on their keyboard.

THANKS!
 
Fontana, can you provide the code for your page? Post a view-source from the browser or a link to the page would be great too.

-kaht

[small]How spicy would you like your chang sauce? Oh man... I have no idea what's goin' on right now...[/small]
[banghead]
 
it sounds as if your submit button is performing additional functionality ... maybe setting the action of the form, or the value of a hidden field...

this stuff won't be done when hitting [enter] on the keyboard.



*cLFlaVA
----------------------------
[tt]( <P> <B>)13 * (<P> <.</B>)[/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top