Click to See Complete Forum and Search --> : processing...please wait?
peloke
04-27-2003, 07:13 PM
I have a php page that will be doing several checks against a db. I need to somehow create a page like what is used on travelocity or other sites where the page says 'processing, please wait' along with some sort of animated graphic. The page then goes away once the other page has completely loaded....how can I do this with javascript? If this isn't done with javascript, what do I use to do it?
Thanks,
Eddie
Guyon
04-28-2003, 04:26 AM
When your server gets the request, it can first output your loading page with whatever graphics 'n stuff you want.
all you need is to add an onload to the body tag like this:
<body onload="window.reload(true);">
...
</body>
I'll leave it to you to work out how the server recognises the reload (use a hidden or something) but you only need to do it once as the browser will wait with the "loading" page sitting there until the results page finally come down.
PS - you might like to consider adding a link so that people without javascript can still access your results.
Vladdy
04-28-2003, 09:15 AM
Nah, use the submiting page to display the "wait" message:
onsubmit="document.body.innerHTML='Please wait....'"
Degrages better too - if JS is disabled such users will still get the result (just without the message)