$(document).ready(function() { athenspartyplus_RefreshTitleArtist(); }); function addTimeStamp(){ tstmp = new Date(); return tstmp.getTime(); } function athenspartyplus_RefreshTitleArtist() { $.ajax({ type: "GET", url: "/whatson/athenspartyplus/NowOnAir.xml?timestamp="+addTimeStamp(), dataType: "xml", success: athenspartyplus_ShowTitleArtist }); } function athenspartyplus_ShowTitleArtist(xml) { $(xml).find("Song").each(function() { $("#athenspartyplusTitle").html($(this).attr("title")); $(xml).find("Artist").each(function() { $("#athenspartyplusArtist").html($(this).attr("name")); }); }); } var oRefreshathenspartyplus; oRefreshathenspartyplus = window.setInterval("athenspartyplus_RefreshTitleArtist()", 50000);