$(document).ready(function() { akouspalko_RefreshTitleArtist(); }); function addTimeStamp(){ tstmp = new Date(); return tstmp.getTime(); } function akouspalko_RefreshTitleArtist() { $.ajax({ type: "GET", url: "/whatson/akousPalko/NowOnAir.xml?timestamp="+addTimeStamp(), dataType: "xml", success: akouspalko_ShowTitleArtist }); } function akouspalko_ShowTitleArtist(xml) { $(xml).find("Song").each(function() { $("#akouspalkoTitle").html($(this).attr("title")); $(xml).find("Artist").each(function() { $("#akouspalkoArtist").html($(this).attr("name")); }); }); } var oRefreshpalko; oRefreshpalko = window.setInterval("akouspalko_RefreshTitleArtist()", 50000);