IE8 中的空白且没有 javascript ajax 回发
我正在更新的网站存在 IE 问题,这让我很困惑。 Firefox 中一切正常(当然)。其中一期网站的所有页面上都有一个额外的空白页。第二个问题是某些页面显示为空白。在这些页面上,有列表集。这些列表集有一个名为 listSet 的 css 类。每个列表集都是通过以下 javascript 填充的:
jQuery(document).ready(function($) {
fillApprovalList("DutaApprovalLists");
});
var fillApprovalList = function(ajaxFunction) {
if (getParameterByName("mode").toLowerCase() == "approve") {
var $listsToFill = $(".approvalList").find(".listSet")
$listsToFill.each(function() {
var $currObj = $(this);
var statusAndId = $currObj.attr("id");
var $table = $currObj.find(".resultList");
fillApprovalListAjax(ajaxFunction,statusAndId,0);
});
}
}
var fillApprovalListAjax = function(ajaxFunction, statusAndId, page){
var $currObj = $("[id='"+statusAndId+"']");
var $table = $currObj.find(".resultList");
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "/database/services/ApprovalList.asmx/"+ajaxFunction,
data: "{statusAndId:'" + statusAndId + "',page:"+page+"}",
dataType: "json",
success: function(data) {
$table.find("tr").remove()
$table.parent().find("#loading").hide()
$table.append(data.d.ResultSet);
var $pagingDiv = $table.parent().find(".paging");
$pagingDiv.find("a").remove()
$pagingDiv.append(data.d.Links);
$pagingDiv.find("a").click(pageApprovalList);
var $countDiv= $table.parent().find("#count");
$countDiv.empty();
$countDiv.append(data.d.DisplayingText);
}
});
}
现在,我无法弄清楚为什么这不起作用。我单步执行代码、javascript 和服务器端,一切都返回正常。为了删除额外的页面,我添加了以下内容:
<!--[if IE 8]>
<style type="text/css">
#small_boxes {
overflow: hidden;
padding-bottom: -150px;
}
</style>
<![endif]-->
但前提是我没有这一行:
<meta http-equiv="X-UA-Compatible" content="IE=xxx" />
如果我将该行修改为,比方说 IE=EmulateIE8,那么该列表页面呈现良好,但随后我会看到白色每页上的空间。我已经尝试了几乎所有 IE= 选项,但没有一个能同时解决这两个问题。 都是这样的:
<script type="text/javascript" language="javascript" src="/scripts/jquery-1.5.1.js"></script>
我所有的 javascript 包含的内容 /脚本>标签。这有点像我正在进行的先有鸡还是先有蛋的交易。
The site that I am updating is having an issue with IE that has me stumped. Everything works fine in Firefox (of course). One issue has an extra blank page on all the website's pages. The second issue is certain pages show up blank. On those pages, there are list sets. Those list sets have a css class called listSet. Each list set is populated via this javascript:
jQuery(document).ready(function($) {
fillApprovalList("DutaApprovalLists");
});
var fillApprovalList = function(ajaxFunction) {
if (getParameterByName("mode").toLowerCase() == "approve") {
var $listsToFill = $(".approvalList").find(".listSet")
$listsToFill.each(function() {
var $currObj = $(this);
var statusAndId = $currObj.attr("id");
var $table = $currObj.find(".resultList");
fillApprovalListAjax(ajaxFunction,statusAndId,0);
});
}
}
var fillApprovalListAjax = function(ajaxFunction, statusAndId, page){
var $currObj = $("[id='"+statusAndId+"']");
var $table = $currObj.find(".resultList");
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "/database/services/ApprovalList.asmx/"+ajaxFunction,
data: "{statusAndId:'" + statusAndId + "',page:"+page+"}",
dataType: "json",
success: function(data) {
$table.find("tr").remove()
$table.parent().find("#loading").hide()
$table.append(data.d.ResultSet);
var $pagingDiv = $table.parent().find(".paging");
$pagingDiv.find("a").remove()
$pagingDiv.append(data.d.Links);
$pagingDiv.find("a").click(pageApprovalList);
var $countDiv= $table.parent().find("#count");
$countDiv.empty();
$countDiv.append(data.d.DisplayingText);
}
});
}
Now, I can't for the life of me figure out why this isnt working. I step through the code, javascript and server side, and everything gets returned OK. To remove the extra page, I included this:
<!--[if IE 8]>
<style type="text/css">
#small_boxes {
overflow: hidden;
padding-bottom: -150px;
}
</style>
<![endif]-->
But only if I don't have this line:
<meta http-equiv="X-UA-Compatible" content="IE=xxx" />
If I were to modify that line to be, lets say IE=EmulateIE8, then that list page renders fine, but then I have the white space on every page. I have tried pretty much all IE= options and none fix both. And all my javascript includes are as such:
<script type="text/javascript" language="javascript" src="/scripts/jquery-1.5.1.js"></script>
Having the < / script> tag. Its kind of like a chicken and the egg deal I have going on.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论