IE8 POST& GET中的JQuery load()不起作用? [英] JQuery load() in IE8 POST&GET not working?

查看:138
本文介绍了IE8 POST& GET中的JQuery load()不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

继承我的情况。

我试图用load()重新加载页面中的div。

Im trying to relaod a div in a page with load().

我首先尝试使用GET。用Firefox而不是IE8工作得很好。

I first tryed with a GET. Worked fine with Firefox but not IE8.

经过一些阅读后,我发现我必须发布我的PARAM,所以我继续做了一个POST。

After a bit of reading, i found out that i had to POST my PARAM so i went on and did a POST.

结果是一样的。它不适用于IE8。以下是用于POST的行。

The result is just the same. It wont work in IE8. Here is the line im using for the POST.

$(\'#test_1\').load( \'../ajax_http.php\',{variable2:xload})

Firebug,(firefox)调试附加组件),将操作视为POST并查看PARAM值
因此它作为POST发送但仍然无法在IE8中运行。

Firebug, (firefox debug add-on), Is seeing the action as a POST and see the PARAM value So its going trough as a POST but still not working in IE8.

这是我使用的实际行:

echo '<div id="test_1" class="test_1" OnClick="$(\'#test_1\').load( \'../ajax_http.php\',{variable2:xload});">';

任何想法?

推荐答案

所以如果IE8不让我获取我的数据,我会得到它自己!我想出了

So if IE8 wont let me GET my data I will get it my self! i came up with

function req_product(user,action,product) {
var data = getXMLHttpRequest();

data.onreadystatechange = function() {
    if (data.readyState == 4 && (data.status == 200 || data.status == 0)) {


        document.getElementById("product_box").innerHTML=data.responseText;

    }

};

var sVar1 = encodeURIComponent(product);
var sVar2 = encodeURIComponent(user);
var sVar3 = encodeURIComponent(action);


data.open("GET", "ajax_http.php?variable1=" + sVar1 + "&variable2=" + sVar2 + "&variable3= " + sVar1, true);
xhr.send(null);

}

IE8正常运行,Firefox 3.5.1,Netscape9.0以及Opera 9.5所以这是我将从哪里开始的!

It's working fine with IE8, Firefox 3.5.1, Netscape9.0 as well as Opera 9.5 So this is where i will start from!

这篇关于IE8 POST&amp; GET中的JQuery load()不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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