Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is pretty funny in the ajax code:

    success: function(result) {
        alert('Please try again.');
    },
    error: function(data) {
        var text = data.responseText;
        // ... processes the data here...
    }
Why is success error and error success?


I think because the request is asking for content type JSON but the Facebook response comes back as javascript with a for (;;); at the beginning. The content types don't match so jQuery invokes the error callback.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: