I am using jQuery and I have an aAax request as follows;
$.ajax({
type: 'POST',
url: 'test.php',
data: {
data: "test_data"
},
cache: false,
success: function(result) {
if (result == "true"){
alert("true");
}else{
alert("false");
}
},
});
This works well. But, I want to do this in a timely manner, in specific intervals of time. Say, I want to execute this every 30 seconds. The page should not be reloaded. I want this to happen in background, hidden. Anybody know how to do this?
1 Answer