I have a problem with js popup window.
I open a popup and try to access its elements in another page page, no success, and I don't want to reload the popup source, I simply want access a element of the opened popup
Ex -
1st page
var popup = window.open("test.html","mypopup","width=500,height=300");
2nd page I want to access mypopup windows elements without reloading the popup
I only need the way how to access opened popup elements without interrupting its sources using JS or JQuery
Same origin (domain, port and protocol)?
Plain JS:
from page1
var popup = window.open("test.html","mypopup","width=500,height=300");
popup.document.getElementById("player").someFunction();
from page 2
var popup = window.open('','mypopup');
// now popup is known again
popup.document.getElementById("player").someFunction();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With