Chitika

Showing posts with label javascript popup child parent message. Show all posts
Showing posts with label javascript popup child parent message. Show all posts

Thursday, February 23, 2012

javascript send message to child window from parent window

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);