How Can I Know When A Window Popup Is Loaded?
Tried this my code: var w = window.open('http://www.jsfiddle.net'); if (w) { w.onload = function() { $('#complete').html('finished'); }; } but I'm far away from b
Solution 1:
If you want to control from parent you could use ajax to grab the html and inject it into the popup window.
$.ajax({
url:"somepage.html",
success:function(html) {
$('#complete').html("finished");
var popup = window.open("");
var doc = popup.document;
doc.write(html);
}
});
Though if the child page has scripts that depend on onload they may not fire,
Post a Comment for "How Can I Know When A Window Popup Is Loaded?"