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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

close popup from child window

Status
Not open for further replies.

nirvanadesign

Programmer
Mar 3, 2005
11
GB
hi guys

i have a large php process page which could take a minute or two to return and wanted a progress bar. so i thought of a javascript popup to indicate a process is happening.

parent window >> [calls php proccess window]
parent window >> [calls javascript popup(newWin)]

php process window has a java function which [onLoad] closes popup.

i can do this by calling the php process window using target _blank and then fire the close popup function from this php process window using onLoad=opener.closefunction()

using this method i have 3 windows open

can i target and close the popup if i was to open the popup from parent window then call the php process into the parent window (_self)

as the name of the popup (newWin) is defined from the parent once i call the php process into the parent i get a java error (object newWin not defined)
 
Let me see if I understand your question. You want to close a popup from the parent window where the source has changed? If so, open the popup using a target of "newWin" or something so the popup window is named. Then in the parent page, after the source has changed, reestablish a connection to the popup using this:
Code:
[green]// Create a link to the existing popup[/green]
var newWin = window.open("","newWin");
[green]// Close the popup[/green]
newWin.close();

Adam

Pedro offers you his protection
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top