jQuery .ajax request failing

Posted by user1644808 on Stack Overflow See other posts from Stack Overflow or by user1644808
Published on 2012-09-04T00:24:59Z Indexed on 2012/09/04 3:38 UTC
Read the original article Hit count: 172

Filed under:

I currently have a jQuery ajax request set up like this

$(document).ready(
    function() { $.ajax({ 
        url : "http://www.my-computer.com:51000/getJson",
        cache : false,
        dataType: "json",
        success : renderPage,
        error: handleError
    })
});

If I manually naviate to http://www.my-computer.com:51000/getJson, I see it returns a json string correctly, but with the above request, I always fall into "handleError" method, with textStatus "error" and not much helpful information. Can anyone help? Thanks!

EDIT: sorry about the my-computer domain. this stackoverflow submission won't let me input localhost, so I put in an arbitrary domain instead. I've tried firebug, but had no luck in getting the json back.

© Stack Overflow or respective owner

Related posts about jQuery