我有一个带有 2 个花式框模式、州和城市的组合框。选择州后,我需要加载一个组合城市。我的代码:
<div id="city" class="hide">
<asp:Literal ID="litCity" runat="server"></asp:Literal>
<a href="#data">Trocar de Cidade</a>
</div>
<asp:UpdatePanel ID="updCity" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="data" class="hide">
<asp:HiddenField ID="hdnNovaCidade" runat="server" Value="" />
<div class="row">
<label for="drpState">Estado *</label>
<asp:DropDownList ID="drpState" runat="server" AutoPostBack="True" > </asp:DropDownList>
</div>
<div class="row">
<label for="drpCity">Cidade *</label>
<asp:DropDownList ID="drpCity" runat="server"></asp:DropDownList>
</div>
<input id="btCidade" type="submit" value="Escolher Cidade" />
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btCarregaCidade" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
查询
$('[id$="drpState"]').change(function () {
$('[id$="hdnState"]')[0].value = $(this).val();
$('[id$="btCarregaCidade"]')[0].click();
});
发生的情况是页面在事件按钮后重新加载并关闭了fancybox。如何在不关闭模式的情况下加载组合框城市?
感谢帮助