is it possible to use fancybox to publish var to iframe on opening?
I currently have:
function fancyBoxLoad(element) {
var elementToEdit = $("#" + $(element).attr("class"));
var content = encodeURIComponent($(elementToEdit).outerHTML());
$.fancybox(
{ 'href': 'loadEditor.php' },
{
frameWidth: 750,
frameHeight: 430,
overlayShow: true,
ajax: {
type: "POST",
data: 'content=' + content
},
type: 'iframe'
}
);
}
It seems that if I remove type: 'iframe', it will publish the data, but it will not appear in the iframe, and if I remove ajax: { type: "POST", data: 'content=' + content }, it will open in the iframe instead, but will not publish the data (the example above does the same)
So my question is: can this be done?
source
share