RE: Iconize weather info and something else
Brought to you by:
iridium
From: Ray v. B. <r_v...@ho...> - 2002-02-10 13:13:47
|
The problem with the loading part in the first part of the page and the reconstruction of the "Loading..." text is that the server does not return a page before the entire page is processed, at least that is what i see. Maybe with very large pages, the browser does not wait for the end and starts displaying before it has received the end. Martin, you're right. Generating a new page from js which contains php is not parsed at the server but processed in the browser directly. Ray >From: "Max Hammond" <ma...@fl...> >To: <php...@li...> >Subject: RE: Iconize weather info and something else >Date: Sun, 10 Feb 2002 10:02:08 -0000 > > >Another idea: > >some js at the top of the page that says "Loading..." that is sent before >the metar load is started, and then some more at the bottom (ie, after the >metar has been loaded and processed) that rewrites the document to just >display the metar? I've no idea what kind of event handler you'd need to >get >it to carry on :) > >Max > > > -----Original Message----- > > From: php...@li... > > [mailto:php...@li...]On Behalf Of Martin > > Geisler > > Sent: 10 February 2002 09:55 > > To: php...@li... > > Subject: Re: Iconize weather info and something else > > > > > > "Ray van Beek" <r_v...@ho...> writes: > > > > > - some javascript. When this page has been loaded, the javascript > > > executes. The javascript should then generate a new 'page' (nr-2). > > > This nr-2 page contains php script that retrieves the metar data. > > > The nr-2 page comes to the browser only when the metar data has been > > > received and processed. The nr-2 page contains javascript (outputted > > > by the php) that sets a javascript metar-variable. > > > > I don't know very much about java(script), but I do know this: > > java(script) runs on the client and PHP runs at the server. The client > > will not be able to make a page nr-2 with come PHP code, as this code > > is executed only at the server. So I think the step above would fail. > > > > But I've seen several pages that redirect you to another page after > > 5-10 seconds. So we could make a page that says 'Retrieving data...', > > and then after 5 seconds the user is redirected to a page that > > displays the data. The first page should trigger the PHP code that > > retrieves the data, so that the data is ready 5 seconds later. > > > > It's just that this would impose a 5 seconds-penalty to every report > > shown, and it also makes the caching mechanisms useless. > > > > What we need is this: a way to update a page on the client at the > > moment data arrives. I don't know if java(script) can be run > > asynchronously in the background, so that the script could wait for > > data in the background (the same way as the browser waits for data in > > the foreground as it is now) and then update the right paragraph on > > the page when the data has arrived. > > > > > [...] > > > > -- > > Martin Geisler My GnuPG Key: 0xF7F6B57B > > > > See my homepage at http://www.gimpster.com/ for: > > PHP Weather => Shows the current weather on your webpage. > > PHP Shell => A telnet-connection (almost :-) in a PHP page. > > > > _______________________________________________ > > PHPWeather-devel mailing list > > PHP...@li... > > https://lists.sourceforge.net/lists/listinfo/phpweather-devel > > > > >_______________________________________________ >PHPWeather-devel mailing list >PHP...@li... >https://lists.sourceforge.net/lists/listinfo/phpweather-devel _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com |