title: Open a view in new tab from javascript when controller returns
body: <p>I need to open a new tab after the controller success, the controller returns a View</p>
  
  <p>This is my approach but it doesn't work:</p>
  
  <pre><code>function modify(){
  
    var1= someDataFromDOM;
    var2= anotherDataFromDOM;
  
    $.ajax({
      method: 'POST',
      url: '@Url.Action("ModifyObject", "ControllerName")',
      data: {id: var1, status: var2},
      success: function (data){
         var newTab = window.open("", "_blank", "",  true);
         newTab.document.body.innerHTML = data;
      }
    });
  }
  </code></pre>
  
  <p>On the controller</p>
  
  <pre><code>[HttpPost]
  public ActionResult ModifyObject(int id, string status)
  {
     ViewModelA model = new ViewModelA();
     model = bd.GetModelA(id, status);
     return View("ModifyObject", model);
  }
  </code></pre>
  
  <p><strong>The controller returns the view correctly but the newTab variable has null value</strong></p>
  
  <p>Any help will be welcome</p>