Parent Window
function ProcessMsgParent(msg) {
.
.
.
}
// open child window
var win = window.open(...);
// send message to child window
win.ProcessMsgChild(msg_to_child);
Child Window
function ProcessMsgChild(msg) {
.
.
.
}
// send message to parent window
window.opener.ProcessMsgParent(msg);
function ProcessMsgParent(msg) {
.
.
.
}
// open child window
var win = window.open(...);
// send message to child window
win.ProcessMsgChild(msg_to_child);
Child Window
function ProcessMsgChild(msg) {
.
.
.
}
// send message to parent window
window.opener.ProcessMsgParent(msg);