1

this is the below code which i am using for delete functionality.At Server side there is RestAPICall. But i can see the request is not at all going to back-end and neither i am getting any error in IE.It's working in FF,Chrome but not in IE9.

var delURL = "url call to restful webservices";
$.ajax({
        type: "DELETE",
        url:delURL,
        contentType: "application/json",
        data: sendUserData(),
        dataType: "json",
        success: function (data) {
            console.log(data);
        },
        error: function (data) {
            console.log("inside error method->" + data);
        }
    });

var sendUserData = function(){
      return JSON.stringify(userData);               
    };

Everytime when i am trying to delete some records there is no request is going to back-end, instead immediately the alert statement in error method will get executed. I had tried and googled some blogs. But not able to get the solution.

Before marking duplicate Let me list down what all i tried:-

1.IE does not support JSON object (e.g.: JSON.stringify()) but the json2.js plugin should compensate for that, and I see that is included in my code. So I have not found the answer yet why still not working.

JSON.stringify and JSON.parse not working in IE9?

JSON.stringify does not work in IE

2.I also read that Jquery.Ajax with delete method not working in IE.

Problem with jQuery.ajax with 'delete' method in ie

Community
  • 1
  • 1
Uday Konduru
  • 203
  • 1
  • 4
  • 16

0 Answers0