I have the following Ajax Call:
$.ajax({
  url: '@Url.Action("DeleteUser", "Tribes")',
  dataType: "json",
  type: "Post",
  data: {
    "tribeId": tribeId,
    "buId": buId,
    "userId": userId
  },
  success: function(data) {
    if (data.status === "success") {
      $.smallBox({
        title: "<strong>User Deleted</strong>",
        content: "<i class='fa fa-clock-o'></i> <i>Tribe user was successfully deleted! <strong></strong></i>",
        color: "#659265",
        iconSmall: "fa fa-check fa-2x fadeInRight animated",
        timeout: 4000
      },
      function(data) {
        window.location.href = '@Url.Action("ViewTribeUsers", "Tribes", new 
        { 
          tribeId = data.tribeId, 
          buId = data.buId 
        })';
      });
    }
  }
});
My controller looks like this:
public ActionResult DeleteUser(int tribeId, int buId, string userId)
{
  clsTribes.DeleteTribeUsers(tribeId, userId);
  return Json(new 
  { 
    status = "success", 
    tribeId = tribeId, 
    buId = buId 
  }, JsonRequestBehavior.AllowGet);
}
How do I get to use the data.[variables] after the AJAX call? In this instance, the error I am getting is on the data.[variable] in this line:
 window.location.href = '@Url.Action("ViewTribeUsers", "Tribes", new 
 { 
   tribeId = data.tribeId, 
   buId = data.buId 
 })';
Error: The name 'data' does not exist in the current context
I am sure it must be simple, any help would be much appreciated!
Thanks!
 
    