Hi,
I have 2 comboboxes on a page. When the user changes the first combobox i would like to focus the second one.
I'm using the OnClientSelectedIndexChanged event of the first combobox to achieve this. On IndexChanged calls the following javascript method
At first i just called input.focus() but i found this post stating i should call window.setTimeout(function() { input.focus() }, 0)
I debugged the code and the focus method gets called but the second combobox doesn't get the focus.
Is this something i can't do in the OnClientSelectedIndexChanged or do i have to call the focus method using another way?
Thanks in advance.
I have 2 comboboxes on a page. When the user changes the first combobox i would like to focus the second one.
I'm using the OnClientSelectedIndexChanged event of the first combobox to achieve this. On IndexChanged calls the following javascript method
| function FirstComboBox_IndexChanged(sender, args) { |
| var comboBox = $find("secondRadComboBox")); |
| if (comboBox != null) { |
| var input = comboBox.get_inputDomElement(); |
| window.setTimeout(function() { input.focus(); }, 0); |
| } |
| } |
At first i just called input.focus() but i found this post stating i should call window.setTimeout(function() { input.focus() }, 0)
I debugged the code and the focus method gets called but the second combobox doesn't get the focus.
Is this something i can't do in the OnClientSelectedIndexChanged or do i have to call the focus method using another way?
Thanks in advance.