Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i want to perform functions in jquerymodal popup in asp.net i load an aspx page in modal dialog but on postback.
i would search people in modal form then selected record will be filled in parent form this is what i want to achieve.searching sorting will be done in modal form.
JavaScript
$("#Loadqty_detl").off("click");
    $(document).on("click", "#Loadqty_detl", function () {
        var dlg1=  $('<div id=DialogDiv>').dialog({
            height: $(document).height() - 100,
            width: $(document).width() - 100,
            appendTo:"form",
            closeOnEscape: true,
            autoOpen: false,
            modal: true,
            title: "Message",
            open: function () {
                $(this).load('Ord_Quantitydetl.aspx');
            },
            show: {
                effect: "blind",
                duration: 500
            },
            hide: {
                effect: "clip",
                duration: 1000
            },
            buttons: {
                Submit: function () {
                    $("[id*=btnmsgOk]").click();
                },
                Close: function () {
                    $(this).dialog("close");
                }
            }
        });
        dlg1.dialog("open");
    });
Posted
Updated 4-Feb-15 23:41pm
v2
Comments
Thanks7872 5-Feb-15 5:42am    
Why to have new page for searching? You can have everything on one form,under one DIV and make it dialogue. Whats the issue?
varun150 5-Feb-15 6:06am    
you are right but my form already so big so i wanted to do it easier way for user moreover i on another form i want this popup for entry of some details
Thanks7872 5-Feb-15 6:19am    
If you stick to this approach, then you have to store your selection somewhere (You made in popup). Then on closing the popup,check there are values or not. If it is, then apply it to the page you aimed at.
varun150 5-Feb-15 6:24am    
i'd store it on var value=$(dialog).open('dialog'); something like this?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900