I have a few '<input type="text" />' controls on my ASP.NET 2.0 generated page.
Every text-box control has it's specific tab-index.
When I try to move focus to this specific text-box control on this page the focus is shifted to the window element instead of the control itself.
On every other text-box control on the page the focus is received fine.
To apply focus to this element I use the code:
Expand|Select|Wrap|Line Numbers
- document.all.elemName.focus();
Expand|Select|Wrap|Line Numbers
- <input name = "ctl00$EditMasterContent$c_carats"
- type = "text"
- maxlength = "10"
- id = "ctl00_EditMasterContent_c_carats"
- tabindex = "6"
- class = "textbox1"
- onchange = "registerOnChangeAction("caratsChanged");"
- onkeypress = "javascript:ChkNumberKeyPress(false);"
- onfocus = "initFocusedElementsVar(this.id);"
- style = "width: 100px;" />
Expand|Select|Wrap|Line Numbers
- <input name = "ctl00$EditMasterContent$c_stones"
- type = "text"
- maxlength = "5"
- id = "ctl00_EditMasterContent_c_stones"
- tabindex = "5"
- class = "textbox1"
- onchange = "registerOnChangeAction("stonesChanged");"
- onkeypress = "javascript:ChkNumberKeyPress(false);"
- onfocus = "initFocusedElementsVar(this.id);"
- style = "width: 100px;" />