开发者

jQuery 1.3.2 append() fails in IE7 and IE8

The code is simple. Works in every browser but IE.

J.get('/upload/uploadresponse/' + uploaded_lessonfile_id , function ( data ){
   J('#upload-files').prepend( data );
});

alert() on data shows the required data. Html is <div id="upload-files"></div> - no magic there.

Would prefer not to upgrade to jQuery 1.4. Would prefer to wipe internet explorer from开发者_StackOverflow社区 the earth.


The problem is that the response body had invalid HTML - an extra </div>. It is inserting into a document that is supposed to be HTML strict.


Have you tried

J('#upload-files').html( data );

make sure your string is either

var data = ' with " quotes inside '; or var data = " using escape \" ";

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜