$(document).ready(function() { akousinlove_RefreshTitleArtist(); }); function addTimeStamp(){ tstmp = new Date(); return tstmp.getTime(); } function akousinlove_RefreshTitleArtist() { $.ajax({ type: "GET", url: "/whatson/akousinlove/NowOnAir.xml?timestamp="+addTimeStamp(), dataType: "xml", success: akousinlove_ShowTitleArtist }); } function akousinlove_ShowTitleArtist(xml) { $(xml).find("Song").each(function() { $("#akousinloveTitle").html($(this).attr("title")); $(xml).find("Artist").each(function() { $("#akousinloveArtist").html($(this).attr("name")); }); }); } var oRefreshinlove; oRefreshinlove = window.setInterval("akousinlove_RefreshTitleArtist()", 50000);