Link to home
Start Free TrialLog in
Avatar of Ricky11
Ricky11

asked on

How to refresh parent page after a pop window is finished loading

I have page1.asp and i would like to auto refresh this page only when a popup window is opened.

Page2.asp is the popup window and when this page is fully opened it redirects to another page "page3.asp" (within the same popup window)

now when page3.asp if finished loading, i would like for it to auto refresh page1.asp whilst maintaining it in the background.

I have tried various java scripts parent refreshs but it doesn't seem to work.

also note that the user may have other windows opens so the correct page must be refresed only.

tks.
Avatar of B_Dorsey
B_Dorsey

on page3.asp

<html>
<head>
<script type="text/javascript" language="javascript">
function RefreshMain(){
    window.opener.window.location.reload()
}
</head>
<body onload="RefreshMain()">

</body>
</html>
ASKER CERTIFIED SOLUTION
Avatar of davecestria
davecestria

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Here, you canput this on a ASP page to test it, it works and derive your code from it.


<%
if request.querystring("this") = "" then
if session("test") <> "" then
      Response.Write "test"
      session("test") = ""
else
      session("test") = "1"
end if
%>
<input type=button onClick=window.open("test.asp?this=3","Ratting","width=550,height=170,left=150,top=200,toolbar=0,status=0,"); value="Open Window">
<%

else
%>
<html>
<head>
<script type="text/javascript" language="javascript">
function RefreshMain(){
    window.opener.location.reload()
}
</script>
</head>
<body onload="RefreshMain()">

</body>
</html>
<%
end if
%>
Thanks for the grade.