Click to See Complete Forum and Search --> : Change cursor focus


OhLordy
05-16-2003, 03:02 AM
How do you set where the cursor is focused?
I have a simple validation script however after the alert box is displayed and the user clicks OK the cursor is focused on the next form element. I want it to be displayed on the one that was just looked at.
Thanks in advance
Rob

Gollum
05-16-2003, 03:17 AM
Use focus()

this function is supported by pretty much all HTML elements that can accept keyboard input...

e.g.
document.formName.myTextBox.focus();