function checkauth(){
jQuery.getJSON("/users/checkauthjson", null, function(xhr){
if(xhr.success){ return true;}else{ return false;}
});
}
Obviously, that does not work, but it illustrates what i want to achieve. I want checkauth to return a value which is checked against an ajax server script.
How do i do this?