ASP.NET (35) SQL (25) JAVASCRIPT (24) HTML (14) STYLE SHEET (6) ASP (4) SCRIPT (1)

Search me out HERE!!

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