I am trying to open a popup like this:
$('#btn').click(function () {
var popup = window.open('mypage.php', '_blank', 'width=500,height=500');
var dom = popup.document.body;
for (i in dom) {
console.log(dom[i]);
}
});
Now what I want to do is to get the html from the popup window and also be able to use maybe a jQuery function from the window.opener (the page that opened the popup)
PS. In the console there are a lot of things printed but no html source.
Use this to try: http://jsfiddle.net/JRqTy/
Thanks in advance.