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.
script:
<script>
$.ajax({
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
}
});
</script>
And controller:
@RequestMapping("pages/recordInsert")
public ResponseEntity<String> placeInsert(@ModelAttribute("place") Place place) {
@SuppressWarnings("unused")
///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