$(document).ready(function() { arionstigmes_RefreshTitleArtist(); }); function addTimeStamp(){ tstmp = new Date(); return tstmp.getTime(); } function arionstigmes_RefreshTitleArtist() { $.ajax({ type: "GET", url: "/whatson/arionstigmes/NowOnAir.xml?timestamp="+addTimeStamp(), dataType: "xml", success: arionstigmes_ShowTitleArtist }); } function arionstigmes_ShowTitleArtist(xml) { $(xml).find("Song").each(function() { $("#arionstigmesTitle").html($(this).attr("title")); $(xml).find("Artist").each(function() { $("#arionstigmesArtist").html($(this).attr("name")); }); }); } var oRefresharionstigmes; oRefresharionstigmes = window.setInterval("arionstigmes_RefreshTitleArtist()", 50000);