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.
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()
);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.