open form in fancybox iframe

Go To StackoverFlow.com

0

I need to post* some data to a page [PopUp.aspx], without refresh the current page. Then [PopUp.aspx] will get the request and response to the fancybox iframe, and i want to continue interactive on the control in [PopUp.aspx].

any suggestion on doing this?

Below are the code, but the return data is pure html with result, i cant interact with the control inside the page [PopUp.aspx]

function onSubmit(ctr)
{
   $.fancybox.showActivity();

    $.ajax({
        type: "POST",
        cache: false,
        url: "PopUp.aspx",
        data: $(ctr).serializeArray(),
        success: function (data) {
            $.fancybox(data);
        }
    });
}

*[Form Get] method is not optimized, so use [Form Post] method

2012-04-04 04:23
by agent99


1

// Display an external page using an iframe
var src = "http://365.ericmmartin.com/";
$.modal('<iframe src="' + src + '" height="450" width="830" style="border:0">', {
    closeHTML:"",
    containerCss:{
        backgroundColor:"#fff",
        borderColor:"#fff",
        height:450,
        padding:0,
        width:830
    },
    overlayClose:true
});
2012-04-04 05:35
by HDK
please clarify on this - agent99 2012-04-04 07:32
Ads