Real-time data on webpage with jQuery

Posted by Steven Hepting on Stack Overflow See other posts from Stack Overflow or by Steven Hepting
Published on 2010-04-11T01:35:22Z Indexed on 2010/04/12 17:03 UTC
Read the original article Hit count: 340

Filed under:
|
|
|

I would like a webpage that constantly updates a graph with new data as it arrives. Regularly, all the data you have is passed to the page at the beginning of the request. However, I need the page to be able to update itself with fresh information every few seconds to redraw the graph.

Background

The webpage will be similar to this http://www.panic.com/blog/2010/03/the-panic-status-board/. The data coming in will temperature values to be graphed measured by an Arduino and saved to the Django database (this part is already complete).

Update

It sounds as though the solution is to use the jQuery.ajax() function ( http://api.jquery.com/jQuery.ajax/) with a function as the .complete callback that will schedule another request several seconds later to a URL that will return the data in JSON format.

How can that method be scheduled? With the .delay() function?

© Stack Overflow or respective owner

Related posts about python

Related posts about django