Automatically Putting the Cursor in a Field
- 0
- Add a Comment
Having a Web site visitor’s cursor appear in just the place you want can be a really nice feature when forms are involved. While this may sound really complicated, it might surprise you to learn just how easy this really is.
It’s worth taking moment to consider if it’s such a such a good idea to set the focus to a form field immediately. I’m always hesitant to change the default behavior of the browser. However, in some situations it makes sense, such as if your form is in a popup-window and there is little else in the popup to interact with. (See Popup Window Tutorial for more details on popups.)
