简体   繁体   English

锚标签弹出窗口在更新面板内不起作用

[英]anchor tag popup not working inside the update panel

When I use the href popup inside Update panel it does not fire click event but outside the update panel, it works. 当我在“更新”面板中使用href弹出窗口时,它不会触发单击事件,但在更新面板之外,它可以正常工作。 I'm using jquery for a popup. 我正在使用jquery弹出一个弹出窗口。 see my code here 在这看到我的代码

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

   <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>

   <asp:Panel ID="personal_panel" runat="server">
     <table>
 <tr class="reason">
   <td>
  <asp:TextBox ID="txt_reasons" runat="server" Visible="False"></asp:TextBox>
  </td>
  </tr>
   <tr>
  <td>
    <asp:ImageButton class="back-img" ID="imgbtn_back" runat="server" ImageUrl="~/images/back-back.png" OnClick="imgbtn_back_Click" onClientclick="submit_hidden()"  />
  </td>
 </tr>
</table>
  <p id="Div1"  style="margin-top: -120px;height: 100px;">
 <a id="popupsubmit" class="trigger_popup_fricc1">Submit</a></p>
                    </asp:Panel>

</ContentTemplate>

 </asp:UpdatePanel>  

Here My Jquery code for popup 这里是我弹出的Jquery代码

                       <script>
            $(window).load(function () {
                $(".trigger_popup_fricc1").click(function () {
                    $('.hover_bkgr_fricc1').show();
                });
                $('.hover_bkgr_fricc1').click(function () {
                    $('.hover_bkgr_fricc1').hide();
                });
                $('.popupCloseButton').click(function () {
                    $('.hover_bkgr_fricc1').hide();
                });
               });

</script>

Try using postback trigger. 尝试使用回发触发器。 Please refer this link. 请参阅此链接。

Button click not working inside update panel 按钮单击不在更新面板内工作

I hope it's helpful. 我希望它有用。 😊 😊

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM