this might be fairly simple but I cant find my way around... I have js (jQuery) code that goes like this:
function publicCheck(research, $clicked) {
var result = null;
$.ajax({
    type: "POST",
    data: "research="+research+ "&action=check",
    url: "ajax_check.pl",
    success: function (msg) {
            if (something ...) {
            result = "ok";
            }
            });
     return result;
     }
=> now why do I get null returned every single time (I know my condition works ok). It must be a scope issue. Why is result not "ok" but is always null even when the condition is valid?
 
     
     
     
    