I have an ajax code that takes in 2 string parameters and passes those parameters to a behind code c# method that updates the user record in the database.
Here is my code:
// Grabs the Customer_ID
<%string inputCust = Session[SessionKey.CUSTOMER_ID].ToString();%>
var custNoString = "<%=inputCust%>"
// Final input for the password.
var finalValue = value2.value;
// Create the data object for the 2 parameters for the c# Method
var dataObj = {};
dataObj.custID1 = custNoString;
dataObj.tempPass2 = finalValue;
// { "custID1" : custNoString , "tempPass2" : finalValue };
// AJAX request to run the function
$.ajax({
type: "post",
url: "reciept.aspx/AddGuestAccount",
contentType: "application/json; charset=utf-8",
data: JSON.stringify(dataObj),
dataType: "json",
success: function(){
$("#Screen1").hide();
$("#Screen2").show();
},
error:function(error){ alert("We are sorry, the action failed. Error: " + error);}
});
return true;
Now when I try and run the code in IE 11, I get "Unable to get property 'stringify' of undefined or null reference" exception.
does anyone know what the problem could be? I am using Jquery 1.7 possibly I need to update to the latest version? Its possible that my ajax code is wrong?
I tried debugging with dev tools in IE and thought mayb IE 11 does not support stringify?
Let me know! Thanks.