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? 9 1838
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/
..oO(OmegaJunio r)
>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 automaticall y 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
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. ve*****@yahoo.c om 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*******@attgl obal.net
=============== ===
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 automatical ly 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
..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
<ve*****@yahoo. compíse v diskusním príspevku
news:11******** **************@ s48g2000cws.goo glegroups.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.)
thanks for the replies, flush worked perfectly, wish I had known about
that before as AJAX is too complicated for something so simple.
On Fri, 02 Mar 2007 10:06:08 +0100, Michael Fesser <ne*****@gmx.de 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 automatical ly 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/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 style="display:none"> can be displayed by setting the style attribute
to "display:", or hidden with "display:none". This gives the illusion that the person
filling out the form is switching from page to page...without the overhead of extra
hits on the server,...
|
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 0H0</p>
<p class="Telephone">Telephone: 555-1234 </p>
<p class="Fax">Fax: 555-4321</p>
</div>
|
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 information around it.
If you know a way, or a third party control, please let me know.
tia
Martin
|
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 want only one instance of the FCKEditor on the screen at one time so I make tabs that the user can click and I store the values in variables behind the scenes. I change the CSS class on the link that is the currently selected one.
I have a really...
|
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 service which writes into a log file periodically
(text file). I want to create a windows form application, which, upon
invocation should continuously display the contents of the log file.
| |
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 combine the "Edit" and "Display"
funtions into this page.
(It means if user want to edit the customer information, this page would
provided editing page to the user;
If the user want to display the customer information, this page would
providev the...
|
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 comments from my HTML.
I reproduced this effect on two computers which use IE6.
Why will IE6 not show the first line of text below when the page
loads?
To see this effect for yourself, view this page online at:
|
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 validated my HTML and CSS code.
1. When I clear cache and refresh my webpage, it takes 3 tries before the popup window displays - I click on the button once, a white window the size of my webpage displays. I close it and click on the button again (for...
|
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 Monitor he needs to see that display in the half of the screen of second monitor (only for a particular module).
For Example: A Video Clip of an Advertisement will be running in 2nd monitor. When the cashier runs the billing module, that...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |