I have two browser tabs, tab1 and tab2.
I have a function called execute in tab1, which I would like to call from the page in tab2.
Is that possible and if s
JavaScript can not do cross-tab scripting in the browser (it is a security risk).
If however the 2nd tab was opened from a window.open() call, and the browsers settings were set up such that new popup windows open in a new tab instead -- then yes, "tab1" can talk to "tab2"
the first tab/window is called the opener and thus the new tab can call functions on the opener using this format:
opener.doSomething();
likewise, the opener can call functions on the new tab/popup, by using the variable it created when creating the popup window.
var myPopup = window.open(url, name, features);
myPopup.doStuffOnPopup();