Reputation: 2844
My program consists of two browser tabs. I open the second tab from the first tab via window.open(..)
. Can I induce changes in the first tab from the second tab? Like sending new Ajax requests etc.
Upvotes: 0
Views: 86
Reputation: 3816
Yes, you can, since window.open()
returns a reference to the new window, and from the new window, you can access the parent window through its opener
property.
You should see : http://www.w3schools.com/jsref/prop_win_opener.asp
So you could invoke functions that are in the parent from the new window (opener.functionName()
) and invoke functions of the new window from the parent (var newWindow : window.open(...); newWindow.functionName2()
);
Upvotes: 1