The calling page is the page that launched the window, not the page in the window. Do you really mean the calling page? If so, that's what:
Code:
agreewin.onclose=function(){ //Define custom code to run when window is closed
}
does. If you mean the page in the window:
Code:
parent.agreewin.onclose=function(){ //Define custom code to run when window is closed
}
I see an example is given:
Code:
mysurvey.onclose=function(){
var iframedoc=this.contentDoc
alert(iframedoc.body.innerHTML) //alert entire body content of iframe
alert(iframedoc.getElementById("myname").value) //alert value of form field with id="myname"
}
That runs on the calling page, but accesses information inside the window. If you want to access information on the calling page use ordinary javascript, without the contentDoc object.
Bookmarks