Status page

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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?



Re: Status page

CptDondo wrote:
Quoted text here. Click to load it

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.

Re: Status page

Jerry Stuckle wrote:

Quoted text here. Click to load it

That's the way I have it set up right now.

Quoted text here. Click to load it

Bummer.  I guess I'm going to have to add a "Click when done" and/or  
some javascript to redirect when it's done.

Site Timeline