Hi, how to user Javascript focus on Web Control Textbox ?<BR><BR>What I want to do is after opening a web page, I want a cursor on the field which is a webcontrol text box (<asp:textbox>).<BR><BR>Thanks<BR>MatthewHere is some code I used to set textbox to all uppercase and to execute the validator when focus changes. The point is that you could add you javascript function to the attributes of the textbox.<BR><BR>oText.Attributes.Add("Language", "Javascript")<BR>oText.Attributes.Add("onKeyUp", "if (event.keyCode >= 65) {if (event.keyCode <= 90) {forms.frmContent." & oField.FieldID & ".value = http://aspmessageboard.com/archive/index.php/forms.frmContent." & oField.FieldID & ".value.toUpperCase();}}")<BR>oText.Attributes.Add("onBlur", "ValidatorOnChange()")Thanks. This is what I used to get it to work:<BR><BR>myBody.Attributes.Add("OnLoad","document.forms[0].CategoryName.focus();")