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

Cross-window open/close

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
here's my situation:
I have one page with a form. When this form is submitted, I open a "progress" window which simply contains a gif animation. The page with the form then goes on to display the results of a query. This query is built from the form. My problem is that I can't figure out how to close the progress window after the query has finished.
here is my code to open the progress window:

var popit = open('waiting.html','waiting','width=400,height=300')

SO if I wanted to close the popup from the FORM page, I'd simply call popit.close(); The problem is that popit isn't accessible to the query results page. SO could anyone please tell me how to close the progress window after the query results page has loaded? Thanks so much for your responses.
 
Here's a crazy idea, I don't know if it'll work.

When you submit your form, pass the form data to your popup page.

Have the javascript in the popup page submit the data for the query, run a timeout (pause), and then self-destruct after submitting the query.

Best of luck with it!
 
my followup:

Thank's very much for the suggestion. I tried it and it worked very well. I did, however, end up going with another solution. I'm describing it here just in case other people run into the same problem as me.

1. I had the popup window come up when the submit button was originally pressed (onClick).
2. The popup window had an onBlur event that closed itself.
3. To finish it off, I had the RESULTS page steal focus automatically when it loaded.

The end result is a popup window that display an animation while the results page is loading. Once the recordset is fully processed, the page steals focus and the popup window goes to popup window heaven.

Thanks again for the help. I have a feeling that I'll be turning to this forum more often.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top