[Javascript] Question about prototype library, but more to the point about Javascript
Terry Riegel
riegel at clearimageonline.com
Fri Oct 23 14:56:13 CDT 2009
Hello All,
I have a function I wrote that uses the prototype library so I hope
that doesn't turn anyone away from the core of my question.
I will start with what I am attempting to accomplish. I want to
periodically execute an XHR request to check in on the status of
another XHR request. So I have written a function called checkin...
function checkIn(l,p){
checkIn = new PeriodicalExecuter(
function(pe){
new Ajax.Request(l,{
method: 'GET',
parameters: 'ajaxrequest=TRUE',
encoding: 'UTF-8',
onComplete: function(t){
logit('checkin()',t.responseText);
if (returnErrorCheck(t.responseText)) {this.stop;}
clearImage="undefined";
}
});
return false;
},
p);
}
I am trying to figure out how to take the PeriodicalExecuter and stop
it after it is started. Any ideas?
Terry
More information about the Javascript
mailing list