use setInterval rather than setTimeout, cosmetic fixes

This commit is contained in:
Thomas Waldmann 2013-12-07 00:48:44 +01:00
parent a58a957b28
commit 92a14df635

View File

@ -41,7 +41,7 @@
$('#response_timestamp').text(new Date().toISOString());
last_ip = ip;
})
.fail(function (data) {
.fail(function( data ) {
$('#response').text('update failed');
$('#response_timestamp').text(new Date().toISOString());
});
@ -50,11 +50,10 @@
.fail(function( data ) {
$('#response').text('myip failed');
});
setTimeout('checkIP', 300000); // repeat in N ms
}
$(document).ready(function() {
checkIP();
setInterval(checkIP, 300000); // repeat every N ms
});
</script>
{% endblock %}