zt9788
zt9788

Reputation: 958

jquery ie8 $(selector).html(large data) can not display

I'm using Jquery ajax to retrieve large data of about 3000~15000 lines of html(>280K). I wan't to

display this in ie8 but it doesn't work. However, if the data is smaller it will work.

//.....
$.ajax({type:'POST' ,url:'${ctx}course/${course.productid}.html',data:data,success: function(result, textStatus){
    //here it can display in chrome,ie10,11 and others. but it is can not work in ie8.
    //result has some javascript and html
    $('#content').html(result);
    }}) 

and i had try the $('#content').html(result.substr(100000)); then it can work~~

so ,who can help me!

Upvotes: 1

Views: 120

Answers (2)

Mario Araque
Mario Araque

Reputation: 4572

IE8 has problems inserting big amount of strings. I fix it using insertAfter or, simply, using innerHTML function.

Weird bug.

Upvotes: 0

Dinesh Mandaviya
Dinesh Mandaviya

Reputation: 192

try with $(obj).html(result.d);

Upvotes: 1

Related Questions