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
// 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
});