Topic: Please wiat page...

Thought this might be as good a place as any to ask this:

I have a page which trawls through a database and generates statistics. This takes quite a while to calculate and so the page appears to be doing nothing when the link is clicked.  What I'd like to add is a quick loading page which says "please wait, stats being calculated" whist the calculations are then carried out and the results displayed.

Any idea how to do this?  (I can imagine some sort of flag on the link, and then a redirect, but how would I stop people linking the url to the results direct? (ie, not via the wait page)

I'm sure it's a simple solution..my brain is just numb today.

TIA,
Rich

Re: Please wiat page...

maybe some sort of onlick on the link that makes a div visible across the whole page saying Please Wait....?

Re: Please wiat page...

Good idea, I was just investigating that. It solves one problem, but it doesn't solve if someone links direct. For that i'm struggling for a solution.

Cheers.

Re: Please wiat page...

there is a way to make a div appear while the page is loading if you did that before running the php i think...

Re: Please wiat page...

Most of us develop web pages generating dynamic data from databases. Summary pages and reports experience a slow loading white page, particularly when the product is on a live or a staging server. The end user on seeing the white page would be tempted to click 'Refresh' button of the browser or 'Back' button, either or both of the operations may hinder with our normal script operations over the server side, unless explicitly handled by them.

http://www.codeproject.com/jscript/Page … essBar.asp

6 (edited by barrowfc 2004-12-30 14:14)

Re: Please wiat page...

The problem with this is that the page is in a template and so won't output until all content is done, and so I'd have to add it to every page (which of course is unnecessary.) 
I think a solution is to have in the header a list of pages which need this 'please wait' displayed and only show it for those page using a solution similar to the above.  I'll give it a go.

thanks for the help.

edit: In fact that won't work at all as the page won't even start to display until the template is outputted. Which won't occur until after all the stats have been generated.  Oh well, at least any links within my site will work fine.