Click here to Skip to main content
15,903,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi every one,
I want to refresh my parent page when i close child window browser. both child and parent window uses master page. But where to handle OnUnload method using javascript for refreshing the parent page. i used the below code in master body tag

onunload="window.opener.location.reload(false)"

it is working fine. but getting problem while executing other forms as these forms also use the master page. So i want to use this onunload in my specific child form. How can this be handled. Plz suggest or send the code

thanks
Posted

1 solution

on child window use the following code

window.close();<br />
if (window.opener && !window.opener.closed)<br />
{<br />
   window.opener.location.reload();<br />
}


regards
koolprasad2003 :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900