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!

button focus

Status
Not open for further replies.

WorkSuxs

Programmer
Jan 26, 2005
28
0
0
US
I have a form that has a button to add numbers to a list, a submit and a reset button. I would like for them to be able to enter a number (text field) and hit the enter key and have the "add numbers" button be "clicked". It currently defaults to the submit button.

I would like to be able to set the default focus or be able to manually set it to the "add numbers" button. I do know how to set the cursor to the input cell where they enter the number(s).

Thanks
 
Instead of setting the "add numbers" type to "button", set it to "submit" and get rid of your submit button.
Code:
<input type="submit" value="add numbers">
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top