473,401 Members | 2,146 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,401 software developers and data experts.

Show the status of counter

I have one script called counter.php (count till 100,000 when this script is
called).
I am caling this script through AJAX. I want to be able to show in the html
page
where this counter is at the moment.

if( window.XMLHttpRequest )
{
http_request = new XMLHttpRequest();
}

http_request.onreadystatechange = getResult;
http_request.open('POST', "counter.php, true );
http_request.send(null);

}

function getResult()
{
if( http_request.readyState == 4 )
{
if( http_request.status == 200 )
{

}
}
}
Aug 21 '06 #1
2 1214
mich dobelman wrote:
I have one script called counter.php (count till 100,000 when this script
is called).
I am caling this script through AJAX. I want to be able to show in the
html page
where this counter is at the moment.

if( window.XMLHttpRequest )
{
http_request = new XMLHttpRequest();
}

http_request.onreadystatechange = getResult;
http_request.open('POST', "counter.php, true );
You might want to add a " around counter.php.

Regards,
Erwin Moller

http_request.send(null);

}

function getResult()
{
if( http_request.readyState == 4 )
{
if( http_request.status == 200 )
{

}
}
}
Aug 21 '06 #2
Rik
mich dobelman wrote:
I have one script called counter.php (count till 100,000 when this script is
called).
I am caling this script through AJAX. I want to be able to show in the html
page
where this counter is at the moment.
Only the script knows where it is at the time. It cannot be told to
report how far it is when it is already running.

You could set an extern variable (file, database, etc.) to a certain
value on every 1000 or so 'count', which will be accessable to other
scripts.

--
Grtz,

Rik Wasmus
Aug 21 '06 #3

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

Similar topics

9
by: Brian Roberts | last post by:
I have a command line Python program that sometimes takes a bit (several minutes) to run. I want to provide an optional method for an impatient user (me!) to check the status of the program. The...
1
by: Francis | last post by:
Hi everyone, I was just wondering if anyone could help me. I am writing a small win32 app using C#/.net. When something is executed, I want to put in a counter which counts up how long the process...
20
by: newbie | last post by:
Hi all, http://www.aswin.be/nictransfer.JPG How can I get these numbers with VB.NET ? I thought somewhere in WMI but I can't find them. Thank you, Aswin
2
by: sethwai | last post by:
Hi, I have a nightly script that executes inplace reorgs allow write access for several tables after a previous script does a large number of delete operations. It usually has been executing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...
0
tracyyun
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...
0
isladogs
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...

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.