Cannot get xmlhttprequest.responseText from JQuery

Posted by Felix Guerrero on Stack Overflow See other posts from Stack Overflow or by Felix Guerrero
Published on 2010-05-19T05:05:01Z Indexed on 2010/05/19 5:10 UTC
Read the original article Hit count: 258

Filed under:
|
|

Hi.

I got this function

function verify_at_bd(){                
    var u = "foo";
    var p = "bar";

    return $.post('auth.php', { name: u, password: p, mobile: '' },             
            function(result){         
                         return result;
                    },'json');   
}

If I do a console.log(verify_at_bd()) I'm getting an xmlhttprequest but cannot access to responseText property. I'm using header("Content-Type: application/json") into my PHP.

I'm using firefox 3.6 on OS X.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about xmlhttprequest