Reply to Re: Status page

Your name:

Reply:


Posted by Jerry Stuckle on 04/02/07 18:51

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@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация