I have this class method in a mootools class:
getData : function(){
var r = new Request.JSON({
url : this.container.getAttribute('data-url'),
method : 'post',
onSuccess : function(j){
this.cards = j;
this.prepareQuiz();
}.bind(this)
}).send();
},
In any browser aside from IE this works fine, but in IE I get a this.cards is not defined in a method that occurs after the this.prepareQuiz method does it's stuff. I narrowed the problem to this section by adding an if ($defined(this.cards)) before the this.prepareQuiz call and if I just keep refreshing the page 1 out of every 5 or so times it will work. So the this.cards variable is not being set some of the time for some reason.
Why would this happen?