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