W
William LaMartin
All of a sudden code that had been working at my websites to set the focus
to a particular text box on page load now produces an error.
The code is:
'put the focus on the first text box
Dim strScript As String
strScript = "<script>"
strScript = strScript & "document.forms[0].txtUserName.focus();"
strScript = strScript & "</script>"
Page.RegisterStartupScript("ClientScript", strScript)
And the error produced is: 'document.forms.0.txtUserName' is null or not an
object
It is happening in my development computer as well at sites. All I can
figure is that some Windows update changed IIS in some way.
What is the solution?
to a particular text box on page load now produces an error.
The code is:
'put the focus on the first text box
Dim strScript As String
strScript = "<script>"
strScript = strScript & "document.forms[0].txtUserName.focus();"
strScript = strScript & "</script>"
Page.RegisterStartupScript("ClientScript", strScript)
And the error produced is: 'document.forms.0.txtUserName' is null or not an
object
It is happening in my development computer as well at sites. All I can
figure is that some Windows update changed IIS in some way.
What is the solution?