I need to get an URL param when a popUp is closed.
For now I`ve tried this:
var win, checkConnect;
win = window.open('some url', 'popup', 'width=900, height=600, top='+top+', left='+left);
checkConnect = setInterval(function() {
if (!win || !win.closed){
console.log('Still Open');
console.log(win.location.href);
} else{
console.log('Closed');
console.log(win.location.href);
}
clearInterval(checkConnect);
}, 1000);
}
But I couldn´t get any data.
Any idea how to deal with this?
Thank you so much.