Today I was working with jQuery AJAX request and got an error in Firefox's JavaScript console saying "not well-formed".
Actually I was returning HTML code for a drop-down from server.
Following solution worked for me.
I altered my AJAX request as follows :
Did this save your day?
Actually I was returning HTML code for a drop-down from server.
Following solution worked for me.
I altered my AJAX request as follows :
$.ajax({ url: "http://abc.com/", beforeSend: function ( xhr ) { xhr.overrideMimeType("text/plain; charset=x-user-defined");
} }).done(function ( data ) {
console.log('Data Received!!');
});
Did this save your day?
0 nhận xét:
Đăng nhận xét