if you mean that need to set focus after some ajax request - check focus attribute of any ajax component. And if after some client actions - yes you could do it with js.
I am not using any ajax actions. I just have 2 text boxes, first is username and second is password is text boxes.
After the form is loaded, I want to focus my cursor in the username text box.
I have attached the code. Please suggest.
In the java script method, when the first line is uncommented, that line is being executed, but the third line is not being executed.
login.txt.zip 917 bytes
} // End of function focusOnUserName
It worked for me.
Thanks a lot.