How to acces a global variable in a callback object in javascript YUI without use window.myvariable
- by quilovnic
I have this :
var MyObject = function(){ this.url
= "monurl"; this.mavar = ""; this.Load = function(){
var callback = {
success: function(o){
mavar = o.responseXML.getElementsByTagName("montag")[0].firstChild.nodeValue;
}
}
YAHOO.util.Connect.asyncRequest('GET',url,callback);
} }
the mavar variable is not accessible. How can I do this ?