Bug Tracker

Opened 12 years ago

Closed 11 years ago

#2468 closed bug (worksforme)

html() funtion of jQuery does't work correctly in ie

Reported by: chsenr Owned by:
Priority: major Milestone: 1.2.4
Component: ajax Version: 1.2.3
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by davidserduke)

$.ajax({
	type: "GET",
	url: '/test/ok.txt',//the html text in this file can't be appended to <div id="c"></div> correctly in ie
	//url: '/test/oops.txt',//but this is not. 
	//by the way .the content in two file can be appended to <div id="c"></div>.
	complete :function (http_req,status){
		   if(status=='success'){
			 jQuery('#c').html(http_req.responseText);
		   } else { //error
		   }
	}	
});  	 

encoding of ok.txt and oops.txt is utf8.

Attachments (2)

ok.txt (3.8 KB) - added by chsenr 12 years ago.
oops.txt (3.8 KB) - added by chsenr 12 years ago.

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by chsenr

Attachment: ok.txt added

Changed 12 years ago by chsenr

Attachment: oops.txt added

comment:1 Changed 12 years ago by chsenr

my ie verson is ie6

comment:2 Changed 12 years ago by flesler

Have you tried using the options 'success' and 'error' instead ? The 'complete' seems to have a different purpose, it doesn't even receive the response.

comment:3 Changed 12 years ago by davidserduke

Component: coreajax
Description: modified (diff)
Priority: criticalmajor

comment:4 Changed 11 years ago by brandon

Resolution: worksforme
Status: newclosed

This is because the oops.txt has a BOM (Byte Order Mark) and IE can't seem to handle it. Remove the BOM and it will work just fine.

Note: See TracTickets for help on using tickets.