I have a add button it calls the controller does what it needs to do but it never calls the success function from the chrome browser? Works in IE so I know it is getting called with another browser not sure why chrome is not working?
$('#ui_btn_AddItem').click(function () {
//...getting the data values here....
$.ajax({
url: "/userGroup/CopyItem",
type: "POST",
dataType: "json",
contentType: "application/json; charset=utf-8",
data: { "id": distribId, "selectedIDs": selectedValues },
success: function (data) {
alert('success');
window.location(data.retUrl); // Success Callback
},
error: function (req, status, error) {
alert('error');
bootbox.alert(req.responseText);
}// error: errorCallback
});
});
My controller is called like [HttpPost]
public ActionResult CopyItem(
...doing some copy stuff then returning the json result.
return Json(new { success = true, retUrl = returnUrl }, JsonRequestBehavior.AllowGet);
not sure why my alert doesn't come up with chrome any ideas?