hi guys,
got a problem with referencing ("this")
Im calling a function of my objectinstanze (LoginHandler) which is
creating a dialog like that:
sendLogin: function(){
var ref= this;
Dialog.confirm($('login').innerHTML, {windowParameters:
{className:"alphacube", width:400}, okLabel: "login", cancelLabel:
"cancel",
ok:function(win){
var para = Form.serialize('myForm');
this.loader1=new net.ContentLoader( url,
function(){ref.checkLogin(this.req);},null, 'Post',para);
}
});
}
checkLogin: fuction(){
alert(this.loader1.req.responseText;);
}
with the following line I wanne initialize a loaderobject for my Object
(LoginHandler) :
this.loader1=new net.ContentLoader( url,
function(){ref.checkLogin(this.req);},null, 'Post',para);
the parameter:
function(){ref.checkLogin(this.req)
calls my function LoginHandler.checkLogin.. The Problem which I have, is
that the Object loader1 is not inside my LoginHandler.
I know that the loader1-Object is inside the Dialog-Object.
But if I'm using
this.Dialog.confirm(....
Its throwing an error.
So how is it possible to get access to my loader1?
_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com