Web应用程序不能在IE浏览器上运行 [英] web application does not run on IE

查看:211
本文介绍了Web应用程序不能在IE浏览器上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我jQuery的形式使用AJAX为我的客户端脚本和Twitter引导的布局,还使用PHP为我的服务器端脚本。

I am using AJAX in form of jQuery for my client side scripting and twitter bootstrap for the layout, also using php for my server side scripting.

但问题是应用程序正常运行所有其他网络探险家除了IE浏览器,没有任何人有一个想法,为什么发生这种情况,我不能即使在IE浏览器下打开一个下降,我都试过版本8 9.

But the problem is the application runs fine on all other web explorers apart from Internet Explorer, does anyone have an idea to why this is happening, I cant even open a drop down in IE and I've tried both version 8 and 9.

这是我的jQuery调用服务器

here is a basic example of my jquery call to the server

function check_module() {
var option = $('#modules option:selected').attr('value');
$.post('modulesDropDown_1.php', 'option='+option,
    function(data){
        var obj = jQuery.parseJSON(data);
        console.log(obj);
        var name = $("#modules option:selected").text();
        $("#moduleCode").html(obj.allInfo.code);
});
return false;
}

我有很多这样的在我的code,其中的IM调用到服务器并返回为JSON的客户端...比如我有一个下拉并很快填充另一个下面的下拉作为值第一个下拉选择(AJAX),但第二个下拉应然后更新基于价值的页面,但它只是没有在IE浏览器。

i have a lot of these in my code, where the im calling to the server and returning it as json to the client... for instance i have a drop down which populates another drop down below soon as a value first drop down is chosen (AJAX), but the second drop down should then update the page based on the value but it just does not work in IE.

推荐答案

旧版本的IE使用不同的机制来创建Ajax请求。尝试是这样的:

Older versions of IE use a different mechanism for creating AJAX requests. Try something like this:

var xmlhttp;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}

虽然因为它不上的IE 8和9运行可能不解决这个问题。 这将有助于看到code片段。

although since it doesn't run on IE 8 and 9 that might not solve it. It would help to see a snippet of code.

(例如,从 http://www.w3schools.com/ajax/tryit的.asp?文件名= tryajax_first

这篇关于Web应用程序不能在IE浏览器上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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