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

"Search in Progress" Pop Up Window ***Urgent

Status
Not open for further replies.

SnowyMeowy

Technical User
Mar 19, 2001
11
US
Dear All,

Please help.

I have a form page whereby after i click on the "Search" button, a pop up window will appear stating that the search is in progress..

1)After a while (let's say about 30 sec), the pop up window will automatically closes itself and the form page will be changed to the search result page.

OR

2) The pop up window closes itself after the search result page is displayed. I'm not sure if either 1 of these 2 methods can be done by using JS. However, if it can be done, please help..


Thanks.
 
Hi,

This solves question 1:

Just add the following into the new popup window.

Code:
<BODY onLoad=&quot;setTimeout(window.close, 5000)&quot;>

The value of 5000 is in milliseconds, so change to your neded amount.

Make sure you open the popup window correcltey otherwise you will get a prompt to close it.

Question 2, not sure about, but you could just use the

Code:
window.close

command in the search result page and reference the popup window.

Cheers

James
 
If you have your search results page do

self.focus()

as soon as it's done loading, it'll push the popup behind, and then the popup can close when JamesUniguy's code reaches the limit, and the user won't see that.

Another idea would be to have the results page open the searching display popup, then it will retain control and be able to close it when the search is complete.
 
Dear Uniguy & Trallacious,

I have managed to do it. However, I have another question. Is there a way whereby i can position the popup window to be at the center of the browser?

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top