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!

Disaplay Please Wait page to prevent browser timeout

Status
Not open for further replies.

nomadsolo

Programmer
Dec 28, 2006
11
IL
Our site hosts a search engine which loads a very large html file containing all the info to search. The size of this page is causing the client's browser to time out. I need a quick HTML/Javascript solution (not server-side) which will perhaps load an intermediary Please Wait page and keep the process going until the real page has finished loading. I do not know how to implement this. Please advise.
Thank you for any suggestions.
 
... Thank you for any suggestions.
Refactor the search solution so that it doesn't deliver such a heavy page to the client browser. There are many search solutions available, and having to put up with that kind of problem is not acceptable in the modern web world.

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Definitely a good idea, Jeff, however, I am looking for a quick and dirty solution to implement, without having (at the present time) to rework the whole search process. I am thinking in terms of some javascript code which would, while the page loads, run some dummy method to keep the browser busy and display a please wait sign, and when the page loads, have the dummy process stop.
 
Hmmm... the thing is that the timeout (I think) is universal to page loading... so even an attempt to interrupt it with Javascript won't really work.

*get's quick and dirty*

How about loading the search page as a small wrapper that shows a "loading" gif or something, and then fires off an AJAX request to the *real* search page, and when the AJAX returns, you can blatt it into an ID'd div or something. You could even get Old Skool and go with an iframe, I guess (oh the pain... no iframes... pleeeese).

Without being able to refactor, I'd say AJAX is the best option. Given the fantasy island code involved in iframe tinkering (queue the trolls), it'll probably take the same time to learn how to do it in AJAX than it does in iframes... of course you'll need to be on the same domain as the the search page (probably the case) and have the ability to tinker with the server-side a little (again, a likely scenario).

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top