Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pop-up window reloads called window 2

Status
Not open for further replies.

dtran

Programmer
Jun 25, 2001
29
0
0
US
Hi guys,

I am trying reload/refresh a page that called a pop-up window when the pop-up window closes. Does that make sense? I have a page that pops up a pop-up window. The pop-up window updates a table in the database. The pop-up window closes. I still have the window that called the pop-up window. I want it to reload/refresh so that it will have the updated value that the pop-up window sent. Any help. Please.

Thanks
 
You can target the results of the form submission in the popup window so they appear in the opening window. Is that what you mean? To do that I had to do two things: assign a window name to the opening window, and target that window name. To assign a name to the opening (main) window I used a one-line javascript in the head section:
Code:
window.name = "mainWin";
To target that window just add target="mainWin" to your form statement in the popup window.
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
I just want the main window to reload/refresh when the popup window closes so I can retreive the updated values that was sent to the database. Can I use something like window.opener.reload() or parent.location.reload()?
 
you can try window.opener.refresh(); Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
no good. it still doesn't work. can i do a window.parent.location.reload()?
 
According to the documentation I just looked at location.reload(1) should work. The value passed (true) is supposed to force an unconditional reload, ignoring the cached version. Whether it's window.opener.location.reload(1) or window.parent.location.reload(1) you may have to experiment with. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
yes!!!!!
thanks. the window.opener.location.reload(1) works great!
 
good Tracy! i got the same problem, now it is solved! Victor
 
When in doubt, look it up. I went to Microsoft's web site and looked that one up. I can't remember everything, but I usually know where to go to find the answers I need. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Thanks Tracy,

Everywhere I asked for the same help, they would just indicate I needed to use the "window.opener.location.reload()" omitting the "(1)".

Nathan Synan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top