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

How can you have an active tab cursor?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,

I've created a form with four input fields. However, I would like the tab cursor to be flashing in the first field instead of having to use the mouse to click on the field. This would save time when typing in large amounts of data.

I have tried code like the following but to no avail. Could anyone help or have a solution to this problem.

<%onload=&quot;document.logonform.field.focus()%>

Thanks


 
well, that should work, actually, but you need to close the end quote, and put in your handy dandy semicolon, and past that, you could even refer to it ordinally, like so:

<body onLoad=&quot;document.formName.elements[0].focus();&quot;>

will put the focus on the first element in your form. Adjust as needed.

:)
Paul Prewett
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top