IE8(兼容模式)将不会加载我的Ajax内容 [英] IE8 (compatibility mode) won't load my Ajax content

查看:132
本文介绍了IE8(兼容模式)将不会加载我的Ajax内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个jQuery脚本在 http://www.qxl.dk/ 可以和我'吨似乎得到IE7(或者更准确地说,IE8在IE7兼容模式)来加载我的内容。

I am working on a jQuery script on http://www.qxl.dk/ and I can't seem to get IE7 (or more accurately, IE8 in IE7 compatibility mode) to load my content.

这是一个名为QXL现实报右侧的边栏加载从外部文件中使用Ajax的HTML内容负载(),然后触发一个自定义的jQuery的事件( aktuelt_loaded )启动一个旋转木马脚本(如滚动newsticker)。

The sidebar box on the right named "QXL Aktuelt" loads its HTML content from an external file using Ajax load(), then triggers a custom jQuery event ("aktuelt_loaded") that starts a carousel script (like a scrolling newsticker).

在同一页上的其他几个部分的内容是通过Ajax的加载,他们工作得很好,所以我不知道发生了什么错。一切都将按预期在Firefox 3.6和IE8,但不是在IE8的兼容模式。

Several other content sections on the same page are loaded through Ajax and they work just fine, so I'm wondering what's going wrong. Everything works as expected in Firefox 3.6 and IE8, but not in IE8's compatibility mode.

这是加载Ajax内容的脚本(内嵌在页面上):

The script that loads the Ajax content is (inline on the page):

<div id="qxlaktueltHolder"></div>
<script type="text/javascript">
    $("#qxlaktueltHolder").load("/contents/dk/modul/qxlaktuelt/qxlaktuelt.htm", function() {
        $("#qxlaktueltHolder").trigger("qxlaktuelt_loaded", []);
    });
</script>
<script type='text/javascript' src='http://www.qxl.dk/contents/dk/js/jcarousellite_1.0.1.min.js'></script>
<script type='text/javascript' src='http://www.qxl.dk/contents/dk/js/qxlaktuelt_liveload.js'></script>

外部脚本来响应该事件是在下列文件:

The external script that responds to the event is in the following file:

http://www.qxl.dk/contents/dk/js/ qxlaktuelt_liveload.js

所有的想法都非常欢迎。

All ideas are very welcome.

推荐答案

编辑:

看起来像正在加载您的内容。你似乎有一个CSS显示问题。使用IE浏览器的开发者工具,我搜索的href的 A 这是正确加载在Safari

Looks like your content is being loaded. You seem to have a CSS display issue. Using IE's developer tools, I searched for the href of an a that was loaded properly in Safari

<$c$c>http://www.123hjemmeside.dk/pages/receive.aspx?target=wl&partnerkey=dkqxl:Hobby_aktuelt_1

和发现即是在页面上以及所有其他内容。

and found that is was on the page along with all the other content.

更新:

现在的问题是与你的 #newsticker 元素。它和所有的元素中,都高度和/或宽度属性设置为 0

The problem is with your #newsticker element. It, and all of its li elements, have height and/or width properties set to 0.

所以,无论code是负责上浆/显示 #newsticker ,其内容似乎是死胡同preT。

So whatever code is responsible for sizing/displaying the #newsticker and its content seems to be the culpret.

这是一个猜测,但这个剧本 qxlaktuelt_liveload.js 之后,这是正装:

This is a guess, but this script qxlaktuelt_liveload.js is being loaded after this:

<script type="text/javascript">
    $("#qxlaktueltHolder").load("/contents/dk/modul/qxlaktuelt/qxlaktuelt.htm", function() {
        $("#qxlaktueltHolder").trigger("qxlaktuelt_loaded", []);
    });
</script>

因此​​,根据多久负载()需要,该脚本可能会或可能不会被加载。

So depending on how long the load() takes, the script may or may not be loaded.

尝试:

<script type='text/javascript' src='http://www.qxl.dk/contents/dk/js/jcarousellite_1.0.1.min.js'></script>
<script type='text/javascript' src='http://www.qxl.dk/contents/dk/js/qxlaktuelt_liveload.js'></script>
<script type="text/javascript">
    $("#qxlaktueltHolder").load("/contents/dk/modul/qxlaktuelt/qxlaktuelt.htm", function() {
        $("#qxlaktueltHolder").trigger("qxlaktuelt_loaded", []);
    });
</script>

这篇关于IE8(兼容模式)将不会加载我的Ajax内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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