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!

Setting Focus on first entry field. 1

Status
Not open for further replies.

BPetro

Programmer
Oct 1, 2002
59
US
I've created a number of pages and all is working just fine, except to get started you must take the mouse and set your focus on the first field before beginning data entry. I know there's got to be a way to set focus to the first entry field, but darned if I can find it in the books I've got.

Can someone share how to do this? Either JScript or VBScript is fine.

Thanks!
 
you should be able to do this. I would put it
just before the end form tag.

<script language=vbscript>
document.[your form name].[your control].focus
'ex document.frm.txtName.Focus
</script>
 
<body onLoad=&quot;formname.inputname.focus();&quot;> A language that doesn't affect the way you think about programming is not worth knowing.
admin@onpntwebdesigns.com
 
Thanks to all, onpnt appears to have won the simplicity award!
 
Code:
[whine]But he didn't have his nifty square brackets  [/whine]

[wink]

-Tarwn &quot;If you eat a live toad first thing in the morning, nothing worse will happen all day long.&quot; - California saying
&quot;To you or the toad&quot; - Niven's restatement of California saying
&quot;-well most of the time anyway...&quot; - programmers caveat to Niven's restatement of California saying
(The Wiz Biz - Ri
 
[lol]


not trying to outdue, trying to create options A language that doesn't affect the way you think about programming is not worth knowing.
admin@onpntwebdesigns.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top