ASP专注于输入跳跃错误 [英] Asp Focus on input jumping bug
问题描述
我有一个使用asp.net的Web表单.在这种形式下,我有很多投入.对于每当您按下下拉菜单之一时,焦点就会跳到下一个文本框.
I've got a web form using asp.net. In this form I have a lot of inputs. For one of the drop downs whenever you press it, the focus jumps to the next text box.
这在更新面板中,因为需要进行过滤,隐藏等操作,这需要服务器端的一些工作.
This is in a update panel, because there is some server side work required for filtering, hiding, etc.
如果用户从 visaType_filter
中选择澳大利亚,则它将隐藏 visaType_dd
并显示 visaType_tb
.如果他们选择NZ,反之亦然.
If the User chooses Australia from visaType_filter
then it hides visaType_dd
and shows visaType_tb
. If they choose NZ its the other way around.
现在我的问题:
当您单击鼠标以转到下一个输入(或控件)时,是否有错误或使焦点从下拉菜单中跳出的东西?
Is there a bug or something that makes focus jump off of a drop down when you click on it to go to the next input (or control)?
代码:
<fieldset>
<asp:UpdatePanel ID="visaTypeUpdatePanel" runat="server">
<ContentTemplate>
<label>Visa Type Number</label>
<label>
<asp:DropDownList ID="visaType_filter" runat="server" Width="40%" OnSelectedIndexChanged="visaType_filter_SelectedIndexChanged" AutoPostBack="true"/>
<asp:TextBox ID="visaType_tb" runat="server" Width="40%" OnTextChanged="visaType_tb_blur" AutoPostBack="true"/>
<asp:DropDownList ID="visaType_dd" runat="server" Width="40%"/>
<asp:Literal ID="visaType_literal" runat="server" />
</label>
</ContentTemplate>
</asp:UpdatePanel>
</fieldset>
<fieldset>
推荐答案
我通过使用jQuery和Ajax代替了 UpdatePanels
解决了我的问题.
I resolved my problem by using jQuery and Ajax in place of UpdatePanels
.
这篇关于ASP专注于输入跳跃错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!