Note that there are some explanatory texts on larger screens.

plurals
  1. POFirefox lose focus on the nested textbox
    primarykey
    data
    text
    <p>I have a nested textbox inside a radiobuttom list item here is the code </p> <pre><code>&lt;asp:RadioButtonList ID="OtherEducInNursing" runat="server" RepeatColumns="1" RepeatDirection="Vertical" RepeatLayout="Table"&gt; &lt;asp:ListItem Value="1"&gt;Certificate&lt;input id="OtherEdNsgCertName" type="text" MaxLength="25"/&gt;&lt;/asp:ListItem&gt; &lt;asp:ListItem Value="2"&gt;Baccalaureate&lt;/asp:ListItem&gt; &lt;asp:ListItem Value="3"&gt;Master&lt;/asp:ListItem&gt; &lt;asp:ListItem Value="4"&gt;Doctorate&lt;/asp:ListItem&gt; &lt;asp:ListItem Value="5"&gt;None of the above&lt;/asp:ListItem&gt;&lt;/asp:RadioButtonList&gt; </code></pre> <p>It works fine both in chrome, but in firefox, when i tried to click the textbox, the blinking cursor loses focus, I have to click the text box couple times to get cursor back</p> <p>I added some code like this</p> <pre><code> onclick="document.getElementById('OtherEdNsgCertName').focus();" </code></pre> <p>which still didn't work, doesn anyone know why and how to fix it? thanks very much</p> <p>edit here is the jquery code too</p> <pre><code>$(document).ready(function () { if($("#&lt;%=OtherEducInNursing.ClientID%&gt; :checked").val()!="1") $("#OtherEdNsgCertName").hide(); else $("#OtherEdNsgCertName").show(); $("#&lt;%=OtherEducInNursing.ClientID%&gt;").click(function () { if($("#&lt;%=OtherEducInNursing.ClientID%&gt; :checked").val()!="1") $("#OtherEdNsgCertName").hide(); else $("#OtherEdNsgCertName").show(); }); </code></pre> <p>edit: html code:</p> <pre><code>&lt;table id="MainPlaceHolder_OtherEducation_OtherEducInNursing"&gt; &lt;tbody&gt;&lt;tr&gt; &lt;td&gt;&lt;input type="radio" value="1" name="ctl00$MainPlaceHolder$OtherEducation$OtherEducInNursing" id="MainPlaceHolder_OtherEducation_OtherEducInNursing_0"&gt;&lt;label for="MainPlaceHolder_OtherEducation_OtherEducInNursing_0"&gt;Certificate&lt;input type="text" onclick="document.getElementById('OtherEdNsgCertName').focus();" maxlength="25" id="OtherEdNsgCertName"&gt;&lt;/label&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;&lt;input type="radio" value="2" name="ctl00$MainPlaceHolder$OtherEducation$OtherEducInNursing" id="MainPlaceHolder_OtherEducation_OtherEducInNursing_1"&gt;&lt;label for="MainPlaceHolder_OtherEducation_OtherEducInNursing_1"&gt;Baccalaureate&lt;/label&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;&lt;input type="radio" value="3" name="ctl00$MainPlaceHolder$OtherEducation$OtherEducInNursing" id="MainPlaceHolder_OtherEducation_OtherEducInNursing_2"&gt;&lt;label for="MainPlaceHolder_OtherEducation_OtherEducInNursing_2"&gt;Master&lt;/label&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;&lt;input type="radio" value="4" name="ctl00$MainPlaceHolder$OtherEducation$OtherEducInNursing" id="MainPlaceHolder_OtherEducation_OtherEducInNursing_3"&gt;&lt;label for="MainPlaceHolder_OtherEducation_OtherEducInNursing_3"&gt;Doctorate&lt;/label&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;&lt;input type="radio" value="5" name="ctl00$MainPlaceHolder$OtherEducation$OtherEducInNursing" id="MainPlaceHolder_OtherEducation_OtherEducInNursing_4"&gt;&lt;label for="MainPlaceHolder_OtherEducation_OtherEducInNursing_4"&gt;None of the above&lt;/label&gt;&lt;/td&gt; &lt;/tr&gt; </code></pre> <p></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload