views:

37

answers:

1

Hi all,

I have an asp.net c# project and need to open another page (within the project) as a popup using jQuery SimpleModel plugin, and close it when user clicks on a link on the popup page. (This link also has some serverside code.)

I could open a page with this code,

$('a#Test').click(function() {
            $.modal('<iframe src="PopUp.aspx" height="450" width="830" style="border:0">', {
                closeHTML: "",
                containerCss: {
                    backgroundColor: "#fff",
                    borderColor: "#fff",
                    height: 450,
                    padding: 0,
                    width: 830
                },
                overlayClose: true
            });
        });

but can't figure it out how to close it on click event of popup page.

Thanks

A: 

From PopUp.aspx, you'd want to use:

parent.$.modal.close(); // or parent.jQuery.modal.close();

In the same page, you'd use:

$.modal.close(); // or jQuery.modal.close();
Eric Martin