Home

Tuesday, March 22, 2011

Refreshing parent window from child window

Below Javascript is used to refresh PARENT window from CHILD window, also CHILD window will be closed.

//Call below Javascript on CLOSE button click in CHILD window
JAVASCRIPT FUNCTION:

function change_parent(){
window.opener.location.href="http:yahoo.com";
self.close();
}
 

Now call this Javascript on your button
onClick="change_parent();"

You will see that when you close your child window your parent page will redirect to 'yahoo.com'

No comments:

Post a Comment

rathoddhirendra.blogspot.com-Google pagerank and Worth