jQuery Ajax无法获得响应

Have problem with this code

var MAIN_LOCATION = "http://www.bosscaffe.com/new/";
$("#gallery_page").click(function() {
    $('#gallery_photos').show();
    getPhotos();
    return false;
}); 

function getPhotos()
{
    $.ajax({
         type: "GET",
         url: MAIN_LOCATION + "classes/getEnterijerPhotos.php?lang="+LANG,
         success: function(msg){
            if (msg != 'nothing')
            {
                $('#photo_wrapper').empty();
                $('#photo_wrapper').append(msg);
            }
         }
    });
}

I tried several things like crossdomain: true, async:false, etc...I tried to switch it to POST, but from some reason this one does not return anything if I fire call in new tab, I get result http://www.bosscaffe.com/new/classes/getEnterijerPhotos.php?lang=en so all of those images are prepared, on my local instance this works but on server it doesn't at all, in Chrome I get status = canceled, any thoughts about this one?

In any case end solution would be to transfer it to JSON, but strange thing that such a functionality not working on same domain.

查看全部
weixin_33695450
weixin_33695450
2012/09/11 14:37
  • asynchronous
  • ajax
  • jquery
  • 点赞
  • 收藏
  • 回答
    私信

2个回复