jQuery的阿贾克斯($阿贾克斯)不工作的镶边。请帮忙 [英] Jquery ajax ($.ajax) not working on chrome. please help

查看:127
本文介绍了jQuery的阿贾克斯($阿贾克斯)不工作的镶边。请帮忙的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一点点帮助找出原因如下code不会对谷歌浏览器5 / Windows XP的工作。它运作良好,在所有其他浏览器(IE,FF,Safri,歌剧等)。有人可以摆脱一些解决这个光?

I need a little help to figure out why the following code does not work on google chrome 5/windows xp. It works well on all other browsers (IE, FF, Safri, Opera etc). Can someone shed some light around this?


    /* AJAX Request */
jq("#a-post-request").unbind("click").bind("click", function(e){ 
    //jq("#loading").css({"display":"block"});
    jq.ajax({
        url: "search_data_table.html",
        type: "get",
        cache: false,
        error: function(){alert ("No data found for your search.");},
        success: function(data){
            jq("#search-results-table tbody").empty().append(data);
            jq("#search-results").css({"display":"block"});
            jq("#search-results-table").trigger("update"); // this one is for the table sorter plugin
            // set sorting column and direction, this will sort on the first column.
            var sorting = [[0,0]];// this one is for the table sorter plugin
            // sort on the first column .
            jq("#search-results-table").trigger("sorton",[sorting]);// this one is for the table sorter plugin
            e.preventDefault();
        }
    });
});

非常感谢, Racky

Many thanks, Racky

推荐答案

我注意到这里的唯一事情是缺少

The only thing I notice here is a missing

dataType: "html"

或什么的。否则,见注释。

or whatever. Else, see comment.

这篇关于jQuery的阿贾克斯($阿贾克斯)不工作的镶边。请帮忙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆