I am having a problem of refreshing a parent page from a pop up window:
Scenario:
Parent page has a dropdown list which needs to be toggled on and off by selecting the checkbox in the pop up window, and then refreshing the parent page, i am able to do it but not through pop up window , so can anyone give useful suggestions.
Thanks alot for viewing this post and suggestions will be appreciated.
Web Application Projectsvisual studio .net 2003ASP.NET
Amanat
Member
1 Points
17 Posts
Refreshing Parent page from Popup window,vb.net
May 09, 2007 04:41 PM|LINK
Hello Friends,
I am working in Vb.net
I am having a problem of refreshing a parent page from a pop up window:
Scenario:
Parent page has a dropdown list which needs to be toggled on and off by selecting the checkbox in the pop up window, and then refreshing the parent page, i am able to do it but not through pop up window , so can anyone give useful suggestions.
Thanks alot for viewing this post and suggestions will be appreciated.
Web Application Projects visual studio .net 2003 ASP.NET
Haissam
All-Star
37421 Points
5632 Posts
Re: Refreshing Parent page from Popup window,vb.net
May 10, 2007 10:16 PM|LINK
Try to use the below code in your child window
Page.ClientScript.RegisterStartupScript(me.GetType(),"refresh","var url = window.opener.location.href; window.opener.location.href = url;",true)
HC
MCAD.NET
| Blog |
arsalan
Member
485 Points
127 Posts
Re: Refreshing Parent page from Popup window,vb.net
May 10, 2007 11:14 PM|LINK
You can refresh the parent page from the child page using javascript.
window.parent.refresh();
MVP ASP.NET Visual Developmnet
User Group Leader DotNetOlympians
MyBlog
Amanat
Member
1 Points
17 Posts
Re: Refreshing Parent page from Popup window,vb.net
May 11, 2007 01:19 PM|LINK
Thanks alot for replying back, but this code line is giving an error that clientscript is not member of page class.
i will appreciate any help further.
Thanks
Haissam
All-Star
37421 Points
5632 Posts
Re: Refreshing Parent page from Popup window,vb.net
May 11, 2007 02:15 PM|LINK
For next time, please provide more information about which framework you are using. the ClientScript exists in ASP.NET 2.0. anyhow try the below code
Page.RegisterStartupScript("refresh","<script language=javascript>var url = window.opener.location.href; window.opener.location.href = url;</script>")
HC
MCAD.NET
| Blog |