Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trigger remote call on parent from popup.

Status
Not open for further replies.

travisbrown

Technical User
Joined
Dec 31, 2001
Messages
1,016
I'm using a little remote call throughout a site. In one instance there is an add/edit popup page. The exit button has a self.close() event. What I want to do is onclick or page unload, before closing, refresh the remote call on the parent page. I don't want to refresh the whole page because there are some transitional state things on the page that would require form submission.

Is there a way to trigger a remote call on the parent page from the popup?

Below is the original call I'm using in the parent page. The target object is 'songlist'

i'm thinking it might be a matter of passing in a more specific target description? Somethign specifying 'opener'?

Code:
function sndReq(page,insert) {
    http.open( 'get', page );
    http.onreadystatechange = function(){
		 if ( http.readyState == 4 ) {
        var response = http.responseText;
        document.getElementById(insert).innerHTML = response;
		}	
	};
    http.send(null);
}
 
I was thinking something like this:

Code:
function sndParentReq(page,insert) {
    http.open( 'get', page );
    http.onreadystatechange = function(){
		 if ( http.readyState == 4 ) {
        var response = http.responseText;
        opener.document.getElementById(insert).innerHTML = response;
		}	
	};
    http.send(null);
 
Wait, it is working. Cached thing maybe. Nevermind.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top