Both the iframe and the parent document are on the same domain. What I would like to do is give the js running in the iframe a callback function that resides in the parent document. Is this possible?
window.frames["testFrame"].org.myorg.events.onDataReady.addListener(function (e) {
alert("Data ready!");
}
I would like "testFrame" to call the anonymous function. The above js would be in the parent document. Is this possible?
Thanks. Update
The following works:
$(document).read(function(){
$(frameObj).load(function () {
window.frames["testFrame"].org.myorg.events.onDataReady.addListener(function (e) {
var doc = $("#summaryFrame")[0].contentDocument;
doc.open();
doc.writeln(e.data.summaryHtml);
doc.close();
});
});