Bug Tracker

Ticket #2468 (new bug)

Opened 6 months ago

Last modified 5 months ago

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

Reported by: chsenr Assigned to: anonymous
Type: bug Priority: major
Milestone: 1.2.4 Component: ajax
Version: 1.2.3 Keywords:
Cc: Needs: Review

Description (last modified by davidserduke) (diff)

$.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

ok.txt (3.8 kB) - added by chsenr 6 months ago.
oops.txt (3.8 kB) - added by chsenr 6 months ago.

Change History

Changed 6 months ago by chsenr

Changed 6 months ago by chsenr

Changed 6 months ago by chsenr

my ie verson is ie6

Changed 6 months 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.

Changed 5 months ago by davidserduke

  • priority changed from critical to major
  • owner deleted
  • component changed from core to ajax
  • description changed from $.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.''' to {{{ $.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.'''
Note: See TracTickets for help on using tickets.