Click here to Skip to main content
15,913,055 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
in my login page i am trying to reload the parent page and my login page is the popup window. when the login is success i want to close the popup and the parent page has to be reloaded, but this entire should be done in the java script only.
my code is

XML
Response.Write("<sc" & "ript lan" & "guage=""Javascr" & "ipt"">parent.parent.GB_hide(); </s" & "cript>")
               Response.Write("<sc" & "ript lan" & "guage=""Javascr" & "ipt"">parent.parent.doreload(); </s" & "cript>")
               Response.End()






please any one can help me please
Posted
Comments
Sergey Alexandrovich Kryukov 13-Jun-13 2:28am    
There is no such thing as "Java script". Java is not a scripting language ;-)
—SA

1 solution

You can access the parent window using
JavaScript
window.opener

And refresh the parent window using
JavaScript
window.opener.reload();

Check Window opener Property[^]..

To register these script, you can use ScriptManager Class[^]. Try this:
C#
ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "Myscript1", "window.close(); window.opener.reload();");", true);



--Amit
 
Share this answer
 
Comments
Anil.Adari 13-Jun-13 2:45am    
i used the window.opener.reload(); method but the popup is closing but the parent page is not reloading

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