JavaScript cannot perform cross-site scripting in the browser (this is a security risk).
If, however, the second tab was opened from the call to window.open() , and the browser settings were configured so that new pop-up windows open on a new tab instead - then yes , "tab1" can talk to "tab2"
the first tab / window is called opener , and thus the new tab can call functions on the opener using this format:
opener.doSomething();
likewise, a novice can call functions on a new tab / popup menu using the variable created when the popup was created.
var myPopup = window.open(url, name, features); myPopup.doStuffOnPopup();
source share