0

I have a div that contains an Asp checkboxlist and is opened by jquery ui dialog . I need to manage the postback too, so I add

.parent().appendTo($("form:first"));

The problem is that when dialog is opened all DOM is disabled, it seems that modal:true is extended to all DOM

this is aspx code :

   <script type="text/javascript">
    $(function () {
        $("#modalDialog").dialog({
            autoOpen: false,
            height: 300,
            width: 350,
            modal: true,
            buttons: {
                "Salva": function () {
                    $("[id*=btn_save]").click();
                },
                "Annulla": function () {
                    $(this).dialog("close");
                }
            },
            close: function () {
            }
        });
        $("#modalDialog").parent().appendTo($("form:first"));
    });
</script>
<div id="modalDialog" >
            <asp:CheckBoxList ID="ckb_eventi" runat="server" DataTextField="NOME" DataValueField="ID_CASSA">
            </asp:CheckBoxList>

        </div>
          <asp:Button ID="btn_save" runat="server" Text="Salva" style = "display:none" OnClick = "btn_save_Click" />

1 Answer 1

1

I solved using jquery ui dialog option :

appendTo: "form:first"

instead of using

$("#modalDialog").parent().appendTo($("form:first"));
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.