JQuery and JS variables
<p>a little misunderstanding with JQuery and JS variables. Simple example:</p>

<pre><code>function someFunc(){

   var flag = true;

    $(function(){
        $.post("/some/address/", {} ,function(data){
            if( data == false){             
                flag = false;
            }
        });
    });
   if(flag == false){
      return false;
   }    
} 
</code></pre>

<p>The main problem is accessibility of variable flag in Jquery functions. I always get the same flag value equal to true. How to make this done ? How to make global variable to be visible for JS and JQuery ? </p>
