A
Alex Wagner
We are working on a large C# .NET application and have recently run into
this very strange problem on two different pages created by two separate
developers:
- The pages contain multiple textboxes, dropdowns, etc.
- there is one textbox.focus() javascript on the pages -- inserted via the
page.RegisterStartupScript
- everything works fine and focus works correctly on most of the postbacks
on the page
- EXCEPT: when a postback is triggered by a drop-down onChange event focus
will not happen.
In fact, focus is set to some ominous no-mans-land hidden-kind-of field
since it's IMpossible to manually--by clicking with the mouse (!)--set focus
to any other field. Not drop-down, not textbox! Only two scenarios remedy
that problem:
1. clicking somewhere away from the input fields (like anywhere on
the page) and then back on the desired input
2. or hitting the TAB key -- at which point the field that was
supposed to receive focus in the first place will contain a happily blinking
cursor...
has ANYbody come across a problem like this or has some idea as to what the
problem could be???
Thanks for the help as ANY input is very much appreciated!!
this very strange problem on two different pages created by two separate
developers:
- The pages contain multiple textboxes, dropdowns, etc.
- there is one textbox.focus() javascript on the pages -- inserted via the
page.RegisterStartupScript
- everything works fine and focus works correctly on most of the postbacks
on the page
- EXCEPT: when a postback is triggered by a drop-down onChange event focus
will not happen.
In fact, focus is set to some ominous no-mans-land hidden-kind-of field
since it's IMpossible to manually--by clicking with the mouse (!)--set focus
to any other field. Not drop-down, not textbox! Only two scenarios remedy
that problem:
1. clicking somewhere away from the input fields (like anywhere on
the page) and then back on the desired input
2. or hitting the TAB key -- at which point the field that was
supposed to receive focus in the first place will contain a happily blinking
cursor...
has ANYbody come across a problem like this or has some idea as to what the
problem could be???
Thanks for the help as ANY input is very much appreciated!!