SetFocus to Textbox on Client-Side in ASP.NET using VBScript
Posted on 2004-10-14
I have a situation where I am doing something on the client-side in an ASP.NET application. Now, I want to set focus back to a particular textbox.
I think the code should be something like -
controlid = document.getElementById("txtCustomerName")
But, of course, it doesn't work.
I get the Error: Object required. 'controlid'
or, when I've tried it with other controls on the same page I get -
Error: Object doesn't support this property or method: 'controlid.setfocus'
This should be doable. Any ideas?