admin管理员组文章数量:1323035
Is there anyone who can give me some thoughts on how to handle window to window munication using javascript givin that the two windows has no parent child relationship. Basically the other window is opened using window.open method. Any brilliant information is well appreciated.
Is there anyone who can give me some thoughts on how to handle window to window munication using javascript givin that the two windows has no parent child relationship. Basically the other window is opened using window.open method. Any brilliant information is well appreciated.
Share Improve this question edited Jan 4, 2011 at 2:05 Dhaust 5,5509 gold badges55 silver badges81 bronze badges asked Jan 4, 2011 at 1:35 user561978user561978 411 silver badge2 bronze badges1 Answer
Reset to default 9assuming the following:
windowHandle=window.open('path/to/document');
you can interact between both windows.
You have a pointer to the window-object from the document where it was opened from using the variable-name:
//doSomething has to be known inside the new window
windowHandle.doSomething();
and from the document inside the new window to the window that opened the new window, using the opener
-property:
//doSomething has to be known inside the window that opened the new window
opener.doSomething();
本文标签: javascriptWindow to Window Communication in js by window nameStack Overflow
版权声明:本文标题:javascript - Window to Window Communication in js by window name - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742107710a2421099.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论