Re: Status page
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Mon, 02 Apr 2007 14:51:37 -0400
CptDondo wrote:
I'm stumped on this one...
I have an embedded system that communicates with a PLC (a sort of embedded computer.)
At one point, the user of my embedded system can sync the data between the two machines. This takes about 40 seconds.
The user clicks on a link, and the php backend initiates the sync. The sync happens in 3 or 4 discrete chunks.
I'd like to show the user a progress bar or text indication that something is happening; thus:
User clicks on [Sync Data]
Screen refreshes with new header, then
Loading Part 1.... {10 second pause}
Loading Part 2.... {10 second pause}
Loading Part 3.... {10 second pause}
Loading Part 4.... {10 second pause}
Page automatically forwards back to Home Page.
How do I do this without having the browser time out? And how do I do the final redirect?
Thanks,
--Yan
You can't stop the browser from timing out. That's client side, and you only have control over the server side.
You could send a meta refresh tag to ask the browser to refresh the page - of course, you'll have to keep track of what's going on separately.
You can also just send a message to the browser - if your html is simple (i.e. no tables, etc.), and you flush() the output after every write, most browsers will display it immediately. That's not a guarantee, though.
And if you do it this way you can't automatically forward back to the home page (you can't redirect after sending any data).
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.
- Follow-Ups:
- Re: Status page
- From: CptDondo
- Re: Status page
- References:
- Status page
- From: CptDondo
- Status page
- Prev by Date: Re: MySQL error stops page rendering
- Next by Date: Re: pear bugs list
- Previous by thread: Status page
- Next by thread: Re: Status page
- Index(es):
Relevant Pages
|