$(document).ready(function() { akousbreeze_RefreshTitleArtist(); }); function addTimeStamp(){ tstmp = new Date(); return tstmp.getTime(); } function akousbreeze_RefreshTitleArtist() { $.ajax({ type: "GET", url: "/whatson/akousbreeze/NowOnAir.xml?timestamp="+addTimeStamp(), dataType: "xml", success: akousbreeze_ShowTitleArtist }); } function akousbreeze_ShowTitleArtist(xml) { $(xml).find("Song").each(function() { $("#akousbreezeTitle").html($(this).attr("title")); $(xml).find("Artist").each(function() { $("#akousbreezeArtist").html($(this).attr("name")); }); }); } var oRefreshbreeze; oRefreshbreeze = window.setInterval("akousbreeze_RefreshTitleArtist()", 50000);