zond zond - 2 months ago 7x
Ajax Question

IE not obviously works with ajax

There are many related questions and answers (1), but I can't solve my problem
with ajax request. It works perfect on all browsers excepting IE. IE won't perform success block.


type : 'post',
async : false,//testing for IE
cache : false,
dataType : 'text',
url : '${pageContext.request.contextPath}/pages/recordInsert',
data : $('#newPlace #place').serialize(),
success : function(data, textStatus) {
console.log('record inserted');
loadPlaces();//reloading data in div

And controller:

public ResponseEntity<String> placeInsert(@ModelAttribute("place") Place place) {
///some useful code
Integer temp = placeService.insertPlace(place);
return new ResponseEntity<String>(HttpStatus.OK);

But when i start in IE Developer Tools (F12) all works perfect in IE too.
Versions: IE 9, jquery 2.1.4


Replace this line:

console.log('record inserted');


if (window.console) console.log('record inserted');