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 )