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

JavaScript to set default submit button

Status
Not open for further replies.

Pichdude

Programmer
Aug 24, 2005
66
0
0
SE
Hi,

Does anybody know of a way, that works both in IE and FF, to define which of my buttons that should be used to post a form when the user hits Enter? As default I guess the first button is fired.

Best regards

Pichdude
 
Give a certain <input> tag a type="submit", and that will be the "default" submit button.


<input type="submit" value="SUBMIT BUTTON" />

[monkey][snake] <.
 
Actually I use JSF and are able to have multiple submit buttons which do different actions with the post. So that does not cover it for me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top