You can use ajax to update certain fragments of the page using the $.ajax or $.getJSON functions,
these functions will call your server side code and retrieve a json block, the json data can then be populated
$.ajax({
url: "mydomain.com/url",
type: "POST",
dataType: "xml/html/script/json",
data: $.param( $("Element or Expression") ),
complete: function(data) {
var tag = $('#idonpage');
tag.text(data.something.etc);
},
success: function() {
//called when successful
},
error: function() {
//called when there is an error
},
});
or you can use the $.load function using the form $.load('someurl #id'), jQuery will parse the html from someurl looking for the
id tag and this data can be used to populate somewhere on your page.
to call a function at given intervals use the javascript setInterval function for example calling a function every 2 seconds :-
setInterval(function() {
do something...
},2000);
use the document ready function before setting all if this up.
$(document).ready(function() {
});
Hope this points you in the right direction.