I have a form that asks for a user name, password and has a submit button. When the form appears, I would like the user name field to be already "selected" so that the user can just type in their user name without having to click on the field first. Any suggestions?
Nilesh Pereira
Ranch Hand
Joined: Apr 14, 2003
Posts: 53
posted
0
Create a javascript function called loadPage(). Call document.formname.fieldname.focus() in this function. Call loadPage() in the onLoad() function of the body tag. Hope that helps
to my knowledge, you are going to need to use js I know with html you can set tab order, but not focus <input type="text" onload="self.focus()"> Eric [ April 16, 2003: Message edited by: Eric Pascarello ]
Nilesh Pereira
Ranch Hand
Joined: Apr 14, 2003
Posts: 53
posted
0
The form input type text has an attribute tabindex, but that only works in the latest browsers.