I have a page with a drop down and several web controls. The drop down
is set to postback and it reloads the textboxes based on the selected
drop down item. I set the focus to the first textbox control on the
client like this:
<script language="vbscr ipt">
Option Explicit
....other code
If Not <%=mbReadOnly %> Then
document.frmDet ails.txtName.fo cus()
End If
....other code
</script>
This works fine on first page load but when I change the drop down it
does reset the focus and you can't even type in the first textbox
until you select another textbox first.
To debug I added a message box right before the set focus to see if it
was even getting to this line of code and it works but I can't leave a
message box here.
Any ideas on what could be the problem?
Thanks in advance for any help,
Deidre
is set to postback and it reloads the textboxes based on the selected
drop down item. I set the focus to the first textbox control on the
client like this:
<script language="vbscr ipt">
Option Explicit
....other code
If Not <%=mbReadOnly %> Then
document.frmDet ails.txtName.fo cus()
End If
....other code
</script>
This works fine on first page load but when I change the drop down it
does reset the focus and you can't even type in the first textbox
until you select another textbox first.
To debug I added a message box right before the set focus to see if it
was even getting to this line of code and it works but I can't leave a
message box here.
Any ideas on what could be the problem?
Thanks in advance for any help,
Deidre
Comment