Microsoft
Software
Hardware
Network
Question : Calling the AJAX function
I have a simple AJAX form. I am calling the AJAX function in the Onclick event of a button.
Everything work well.
Now, what I want is I want this AJAX function executed every 5 seconds. How to do that?
The idea is to display the content of a text file from the server which is updated frequently.
For example, consider the hit counter which is stored in a text file, which is updated if any visitor enters the website home page. If i want to display the hit counter without refreshing the page, I need to use AJAX. This is just an example for you to understand what I want.
Any help is appreciated.
Thanks.
Answer : Calling the AJAX function
Use the setInterval() function:
MyInterval = setInterval('LoadTextFile(
);',5000);
You can cancel it with clearInterval():
clearInterval(MyInterval);
Random Solutions
[Sybase][ODBC Driver]Unable to connect to database server: unable to start database engine
How do I properly modify the Onet.xml?
Simple Regex Replace
ISA 2006 problems
AIX non rootvg backup of two system
i want to install lout 3.38 on linux. while installing through make command it gives some problem. how to solve this?
Space Issue with Exchange 2003
Creating online Tutorials (What software is available for this?)
sendmail - stat=Deferred: Connection refused by [127.0.0.1]
Can I link to a local drive or program from Sharepoint 2007?