74
rated 0 times
[
80]
[
6]
/ answers: 1 / hits: 47554
/ 14 Years ago, sat, may 1, 2010, 12:00:00
I need to access this
from my setInterval
handler
prefs: null,
startup : function()
{
// init prefs
...
this.retrieve_rate();
this.intervalID = setInterval(this.retrieve_rate, this.INTERVAL);
},
retrieve_rate : function()
{
var ajax = null;
ajax = new XMLHttpRequest();
ajax.open('GET', 'http://xyz.example', true);
ajax.onload = function()
{
// access prefs here
}
}
How can I access this.prefs
in ajax.onload
?
More From » this