how can i get return value of javascript funtion
<p>my code like this</p>

<pre><code>    var key,value;     
   //……some code……    
   function checkReg(i,j){    
       $.getJSON(api_checkExists,{"k":i,"v":j,"rand":Math.random()},function(c){    
           alert(c.status);    
           return(c.status);    
       });      
   }        
    var temp=checkReg(key,value);    
    alert(temp);   
</code></pre>

<p>the problem is when i run it in my browser,   </p>

<p>it always fist alert undifined then alert the return value; seems like that can not get the return value of function checkReg .i wasso confused,what show i do?</p>
