and the select element do not support select()
it may cause error
Main Topics
Browse All TopicsHi:
I have a simple data entry form which I have inherited from another programmer and I added several fields to it. When I set the tabindex, the fields were not tabbed to in the order proscribed. After some pondering I realized that the problem was nesting tables.
To solve the problem I wrote a little javascript setFocus function which I accessed from the clientside onblur. This solved the problem until I got to the dropdown list boxes that I added. The first ddl is selected, but the second one is skipped. This only happens in IE6. IE7 is fine. I do not need to check for other browsers. Does anyone know what the workaround for IE6 is? Relevant code is below. I am using .net framework 3.5 and Visual Studio 2008.
Thank you.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I added the line onblur="setTimeout('setFoc
the onclick event is not appropriate here. I get a syntax error which highlights the tabindex. Somehow I think the error has to do with the new code. So I added an ' after the sefFocus function to close the single quotes. That did not help either. Is there code that perhaps I could put in my setFocus function what would say if IE7 do this else do that.?
mplungjan thank you for your help. With your idea on setTimer and adding code that checked for IE version I was able to solve the problem.
Javascript:
functio
if (/MSIE (\d+\.\d+);/.test(navigato
var ieversion = new Number(RegExp.$1) // capture x.x portion and store as a number
if (ieversion >= 7) document.getElementById(fi
else if (ieversion >= 6) setTimeout(document.getEle
else setTimeout(document.getEle
}
}
HTML Code. I have bolded the changes.
<tr>
<td class="ObservationLabelBol
<asp:Label ID="lblDied" runat="server" Text="Died from Illness:"></asp:Label>
</td>
<td>
<asp:RadioButtonList ID="rbDied" runat="server" RepeatDirection="Horizonta
Height="16px" TabIndex="10" onblur="setFocus('ddlLHJSp
<asp:ListItem Value="1">Yes</asp:ListItem>
<asp:ListItem Value="2">No</asp:ListItem>
<asp:ListItem Value="9">DK</asp:ListItem>
<asp:ListItem Value="8">NA</asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
<tr>
<td style="text-align: right; white-space: nowrap;">
<asp:Label ID="lbLHJSp" CssClass="ObservationLabel
Text="LHJ Species/Organism:" TabIndex="0"></asp:Label>
</td>
<td style="white-space: nowrap;">
<asp:DropDownList ID="ddlLHJSpecies" runat="server" Width="176px" TabIndex="11" CssClass="ObservationText"
onblur="tieTextBox(this,'d
</asp:DropDownList>
</td>
<td >
<asp:TextBox id="txtSpOther" runat="server" Width="100%" TextMode="SingleLine"
CssClass="ObsReadOnlyAppSe
Enabled="False" TabIndex="-1" onblur="setFocus('ddlLHJSe
</td>
</tr>
<tr>
<td style="text-align:right; white-space: nowrap;">
<asp:Label ID="lbLHJSero" CssClass="ObservationLabel
Text="LHJ Serotype/Serogroup:" TabIndex="-1"></asp:Label>
</td>
<td style="white-space: nowrap;">
<asp:DropDownList ID="ddlLHJSerogroup" runat="server" Width="176px" TabIndex="12"
CssClass="ObservationText"
onblur="tieTextBox(this,'d
</asp:DropDownList>
</td>
<td >
<asp:TextBox id="txtSeroOther" runat="server" Width="100%" TextMode="SingleLine"
CssClass="ObsReadOnlyAppSe
Enabled="False" TabIndex="-1" onblur="setFocus('txtLHJNo
</td>
</tr>
Business Accounts
Answer for Membership
by: quincydudePosted on 2009-08-04 at 18:50:50ID: 25019687
hm.... eld).selec t; ? eld).selec t();?
what is document.getElementById(fi
do u mean
document.getElementById(fi