473,320 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to display web page continuosly?

I have a script that takes collects info from various websites to
compile a report. However whenever I run it, my web browser waits for
the script to finish ( 1 minute ) before displaying the report. But my
script is outputting data every few seconds . So is there a way to
make my browser display the web page every few seconds and update
automatically as more data comes?

Mar 2 '07 #1
9 1807
On Fri, 02 Mar 2007 06:59:43 +0100, <ve*****@yahoo.comwrote:
I have a script that takes collects info from various websites to
compile a report. However whenever I run it, my web browser waits for
the script to finish ( 1 minute ) before displaying the report. But my
script is outputting data every few seconds . So is there a way to
make my browser display the web page every few seconds and update
automatically as more data comes?
Yup, there is. It's called AJAX, and it's javascript method. You can use
it to have a web page waiting for input from another script (in your case
the php script).
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Mar 2 '07 #2
..oO(OmegaJunior)
>On Fri, 02 Mar 2007 06:59:43 +0100, <ve*****@yahoo.comwrote:
>I have a script that takes collects info from various websites to
compile a report. However whenever I run it, my web browser waits for
the script to finish ( 1 minute ) before displaying the report. But my
script is outputting data every few seconds . So is there a way to
make my browser display the web page every few seconds and update
automatically as more data comes?

Yup, there is. It's called AJAX, and it's javascript method. You can use
it to have a web page waiting for input from another script (in your case
the php script).
Two years ago the answer probably would have been as simple as

| Try flush() to force the script output being sent and don't put the
| entire page into a big table, as some browsers are not able to render
| it incrementally.

Today all folks cry for AJAX immediately, even for something as simple
as a status report ...

Micha
Mar 2 '07 #3
Michael Fesser wrote:
Today all folks cry for AJAX immediately, even for something as simple
as a status report ...
AJAX will solve all problems. If it fails to, try Mr. Clean. Yeah he's
got an earing, but man is he tough on dirt and grime.

Mar 2 '07 #4
ve*****@yahoo.com wrote:
I have a script that takes collects info from various websites to
compile a report. However whenever I run it, my web browser waits for
the script to finish ( 1 minute ) before displaying the report. But my
script is outputting data every few seconds . So is there a way to
make my browser display the web page every few seconds and update
automatically as more data comes?
Two things can be happening here:

1. PHP and Apache are caching the data. Calling flush() should send it
to the browser

2. The browser itself is caching before displaying. Some browsers will
do this if they can't display things right away (i.e. a table without
columns and widths defined). Simplifying your HTML could help here.

I'd use AJAX as a last resort. It's way overkill for something like this.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Mar 2 '07 #5
flush() is good, but AJAX is modern and cool and everybody wants modern and
cool webs :)

Michael Fesser wrote:
.oO(OmegaJunior)
>>On Fri, 02 Mar 2007 06:59:43 +0100, <ve*****@yahoo.comwrote:
>>I have a script that takes collects info from various websites to
compile a report. However whenever I run it, my web browser waits for
the script to finish ( 1 minute ) before displaying the report. But my
script is outputting data every few seconds . So is there a way to
make my browser display the web page every few seconds and update
automatically as more data comes?

Yup, there is. It's called AJAX, and it's javascript method. You can use
it to have a web page waiting for input from another script (in your case
the php script).

Two years ago the answer probably would have been as simple as

| Try flush() to force the script output being sent and don't put the
| entire page into a big table, as some browsers are not able to render
| it incrementally.

Today all folks cry for AJAX immediately, even for something as simple
as a status report ...

Micha
Mar 2 '07 #6
..oO(Gootes)
>flush() is good, but AJAX is modern and cool and everybody wants modern and
cool webs :)
modern + cool = unreliable ;)

AJAX is optional, server-side stuff works always.

Micha
Mar 2 '07 #7
<ve*****@yahoo.compíse v diskusním príspevku
news:11**********************@s48g2000cws.googlegr oups.com...
>I have a script that takes collects info from various websites to
compile a report. However whenever I run it, my web browser waits for
the script to finish ( 1 minute ) before displaying the report. But my
script is outputting data every few seconds . So is there a way to
make my browser display the web page every few seconds and update
automatically as more data comes?
Use flush() and some other tricks.
1) do not use <tabledesign or if you must, use a short tables. Many
browsers do not dispaly anything until get the </tabletag.
2) Many browsers wait for unspecified number of bytes before dispaly part of
page content. To avoid this you can send say 1024 spaces - char(32) - after
each data you need to display immediately. Browser reduce these 1024 spaces
to 1 only but must show content.
--

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)
Mar 3 '07 #8
thanks for the replies, flush worked perfectly, wish I had known about
that before as AJAX is too complicated for something so simple.

Mar 3 '07 #9
On Fri, 02 Mar 2007 10:06:08 +0100, Michael Fesser <ne*****@gmx.dewrote:
.oO(OmegaJunior)
>On Fri, 02 Mar 2007 06:59:43 +0100, <ve*****@yahoo.comwrote:
>>I have a script that takes collects info from various websites to
compile a report. However whenever I run it, my web browser waits for
the script to finish ( 1 minute ) before displaying the report. But my
script is outputting data every few seconds . So is there a way to
make my browser display the web page every few seconds and update
automatically as more data comes?

Yup, there is. It's called AJAX, and it's javascript method. You can use
it to have a web page waiting for input from another script (in your
case
the php script).

Two years ago the answer probably would have been as simple as

| Try flush() to force the script output being sent and don't put the
| entire page into a big table, as some browsers are not able to render
| it incrementally.

Today all folks cry for AJAX immediately, even for something as simple
as a status report ...

Micha
Hey, veg_all asked for any solution, not the easiest one. Had I known
about flush() I probably would've opted that too.

Thank you for sharing!

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Mar 3 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div...
23
by: Mat | last post by:
<div id="container"> <div id="main"> <div id="header"> <p class="Address">123 Fake Street, </p> <p class="City">Crazy City, </p> <p class="Province">Ontario </p> <p class="PostalCode">H0H...
5
by: Martin Moser | last post by:
Does somebody knows, if theres a way to display any file (tiff, doc, pdf, .....) "inline" on an asp.net site? What I want to do is, to display a file, which is stored in the DB, and some...
1
by: rbinington | last post by:
Hi, I am trying to write a DNN module that has the ability to insert articles into an article repository. I want the users to be able to move pages around and enter text into the FCKEditor. I...
6
by: Aspiring .NET Programmer | last post by:
Happy Friday everyone!!! I am working on a windows service and a C# application and needed some help with certain functionality. Please read through my issue below. Thanks! I have a windows...
1
by: Benny Ng | last post by:
Dear All, Now I met one problem in the development of my one application. I have one ASP.NET page. It's for disply the information of customer. But now I have one new requirement. It's to...
9
by: Edward | last post by:
IE6 only displays certain text on my site if you mouse over it (!). I reduced the HTML down to this code below which still shows this effect/bug. My temporary solution was to take out all the...
2
by: wreed06 | last post by:
Hello, I have 2 problems. In my webpage, I have a dropdown list with a button that takes the user to a popup window specific to the option. I am using Firefox 2.0.0.13. I have successfully...
0
by: praveenhathwar | last post by:
I ve developed an application. My client has two monitors for a single PC. He wants to display a video clip in the second monitor continuosly (Repeatedly) and when the application in runs in Primay...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.