Re: Status page



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
==================
.



Relevant Pages

  • Status page
    ... the user of my embedded system can sync the data between the two machines. ... Loading Part 1.... ... {10 second pause} ...
    (comp.lang.php)
  • Re: Hijacked Browser.....
    ... Please reply to the News Groups ... browser have been hijacked. ... We delete it everytime we start up the computer and reset ... It claims that it is loading a blank web page ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: OT: a vexing computer problem...
    ... There is a delay in loading, and then there is just a white screen... ... The web browser goes to the correct page and indicates 'done' but there is ... corrupt video on a news site which caused it in my case. ... Check your loading of the ASP-related files on your computer. ...
    (rec.crafts.metalworking)
  • Re: ESPN home page
    ... My IE 6.0 browser also fails to complete ... the loading on this site. ... plays the banner animation as naseum. ... I have a DSL connection, ...
    (alt.sports.football.pro.ne-patriots)
  • Re: Executing a validating query before loading a page
    ... > paste it to the browser the USER still sees the page. ... > Is there a way how to check the user in the DB before loading the page ... you use dotnet's authentication and authorization features. ...
    (microsoft.public.dotnet.framework.aspnet)