IE浏览器返回通过Ajax不完整的HTML [英] IE returns incomplete HTML via Ajax

查看:255
本文介绍了IE浏览器返回通过Ajax不完整的HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

它归结为这一行:

jQuery.ajax(
{
    type    : "POST",
    url     : "....",
    data    : daten,
    dataType: 'html',
    success : function(response)
    { 
        jQuery('div[id="Main"]').html(response);
        ...

问题IST,IE浏览器回应的回应,这取决于IE的版本我用不完整的块。 好像什么都在IE 8返回任何内容,而它返回一个如90%,在IE 9中的内容。 有趣的是:在IE 9它切断HTML的code(如10线),但是它可以追溯到上。 它不完全切断它只是随机的HTML code创建的洞。

The problem ist that IE responds incomplete blocks of the "response" depending of what IE Version I use. Like it does not return any content in IE 8 whereas it returns like 90 % of the content in IE-9. Interesting thing is: in IE-9 it cuts off html-code (like 10 lines) but then it goes back on. It does not cut off completely it just randomly creates "holes" in the HTML code.

在IE浏览器10它工作得很好......我的机器上,别人没有。

In IE 10 it works just fine ... on my machine, on others it does not.

我们已经尝试过使用附加(),appendTo(),空(),innerHTML的和所有的东西,但是没有一次成功。

We already tried to use append(), appendTo(), empty(), innerHtml and all that stuff but none of them worked.

此外,我们正努力在Demandware;所以刚生产实例,即不显示code correcty。所有其他的实例正在使用相同的code版本。

Also, we are working in Demandware; so there is just the production instance, that does not show the code correcty. All other instances are working with the same code-version.

好像正在加载额外使Ajax调用去克雷在IE什么。

Seems like anything that is being loaded additionally makes the ajax Call go cray in IE.

有没有人有一个想法如何解决这一问题?

Does anyone have an idea how to fix this ?

推荐答案

该解决方案是一个        <! -  开始一个JavaScript里面的标签。 因为它不是封闭的,而是由\ r分,旧的IE浏览器无法处理它

The solution was a <!-- starting tag inside a javascript. Because it was not closed but divided by \r, older IE browsers could not handle it

这篇关于IE浏览器返回通过Ajax不完整的HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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