Answer for facebook asyc register validation working example
===

Ppl out there I have been recently looking into facebook custom registration plugin , where asyc problem was hit by many , finally this code worked for me . 
   

    `<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
    <script> 
    function validate_async(form, cb) {
    console.log('entering the validate function  ');
    
      $.getJSON('http://localhost/jaitest/check.php?username='+form.username , 
        function(response) {
      
    	
          if (response=='null') {
            
            cb();
          }
          else
          cb({username: 'That username is taken'});
      });
    }
    </script> 

` 

this is my index.php  and where as check.php is 

        
    <?php
    
    $uname = $_GET['username'];
    $name='jai';
    if($uname==$name)
    {
    	echo json_encode($uname);
    }
    else
    {
    	echo json_encode('null');
    }
    
    ?>

this is not db connection , just an example working of it 
Thankx 
jai
[UMAT][1]
   

     
   


  [1]: http://umat.net.au