I cant give specifics because i'm not sure how i'd do it exactly, but the logic would be something like... (in pseudocode)
Code:
var timerflag = false;
var count = 0;
function AJAXCall() {
......
//All your normal AJAX stuff goes here
count = 0;
timerflag = true;
startTimer();
}
function startTimer() {
//Implement counter to count to 30, if it reaches 30, stop timer and output message
//Counter should check timerflag to see if it needs to stop early.
}
function AJAXReceiveHandler() {
.......
//Normal AJAX handler to receive data
timerflag = false;
}
Bookmarks