How do I build a specialized JQuery Timer
Posted
by Sayem Ahmed
on Stack Overflow
See other posts from Stack Overflow
or by Sayem Ahmed
Published on 2010-05-10T15:18:49Z
Indexed on
2010/05/10
15:24 UTC
Read the original article
Hit count: 247
I have an asp.net page where two grid views are available showing current stock market price updates. I need to update these two grid views every 20 seconds. So I was thinking of using JQuery to do this job.
What I need is a timer which will fire every 20 seconds, send an ajax request to the servers, bring the order lists from the server using json and then update those two grid views. If a request to the server is still being served 20 seconds after it is fired, then I want the old one to be aborted without causing any trouble.
I already know how to bring objects using json. I just need to figure out how to send a request every 20 seconds and cancel a request if it is still being server for 20 seconds.
© Stack Overflow or respective owner