var stataStr=''; var Smiw0udh=function(){ var randomnumber=Math.floor(new Date().getTime()/1000);//Math.floor((Math.random()*10000)+1); $.getJSON( "/admin/logs/activeusers.json?"+randomnumber, function( data ) { $("#activeVisitors").html(data.totalsForAllResults["rt:activeVisitors"]); }); setTimeout(function(){Smiw0udh();},30000); } $(document).ready(function(){ Smiw0udh(); }); $('#tube_info').html(stataStr);