Ja jag hittade det nu
http://www.codeproject.com/KB/ajax/Ajax_Call_using_AjaxNet.as...
Får försöka leta upp hur man laddar ett JS varje 15min från Ajax hmm
EDIT: Har kommit så här långt men har kört fast
<script type="text/javascript">
function startTimer() {
$.get('script.php')
var now = new Date(year, month, day, hours, minutes, seconds, milliseconds);
var minutes = now.getMinutes();
var seconds = now.getSeconds();
setTimeout('refresh()',(((15 - (minutes % 15) - ((seconds>0)?1:0)) * 60) + (60 - seconds)) * 1000);
setTimeout("startTimer()",900000); //Delay on function (15min)
}
function refresh() {
$('#51').load('51.php');
}
startTimer();
</script>
Sen innehåller script.php detta:
<?
function get_time()
{
$now = date(urldecode($_POST['time-format']) );
return $now;
}
if( !empty($_POST['time-format']) )
{
$time = get_time();
echo $time;
}
?>