title: How can I RedirectToAction within $.ajax callback?
body: <p>I use $.ajax() to poll an action method every 5 seconds as follows:</p>
  
  <pre><code>$.ajax({
      type: 'GET', url: '/MyController/IsReady/1',
      dataType: 'json', success: function (xhr_data) {
          if (xhr_data.active == 'pending') {
              setTimeout(function () { ajaxRequest(); }, 5000);                  
          }
      }
  });
  </code></pre>
  
  <p>and the ActionResult action:</p>
  
  <pre><code>public ActionResult IsReady(int id)
  {
      if(true)
      {
          return RedirectToAction("AnotherAction");
      }
      return Json("pending");
  }
  </code></pre>
  
  <p>I had to change the action return type to ActionResult in order to use RedirectToAction (originally it was JsonResult and I was returning <code>Json(new { active = 'active' };</code>), but it looks to have trouble redirecting and rendering the new View from within the $.ajax() success callback. I need to redirect to "AnotherAction" from within this polling ajax postback. Firebug's response is the View from "AnotherAction", but it's not rendering.</p>