In JavaScript I created an User class. I wrote a method(function) to this, but i can't give a return statement. Here is my class:
function User() {
var isLogedIn = "FukkaMukka";
var mail = "";
var name = "";
//functions
this.isLogedInFn = function(callback) {
$.post("controller.php?module=login&action=test", function(e) {
this.isLogedIn = false; // Here i can't reach the object variable.. why?
return e;
})
}
this.logIn = logIn;
}