title: Open URL after success in Ajax function
body: <p>I am trying to open an URL from an Ajax function, but the URL is not called.</p>
  
  <p>This is my code:</p>
  
  <pre><code>$(document).on( "click",".btndriver", function() {
        var id = $(this).attr("id");
        var nombre = $(this).attr("nombre");
  
        swal({   
          title: "Select Driver?",   
          text: "Select Driver? : "+nombre+" ?",   
          type: "warning",   
          showCancelButton: true,   
          confirmButtonColor: "#DD6B55",   
          confirmButtonText: "GO",   
          closeOnConfirm: true }, 
          function(){   
            var value = {
              id: id
            };
            $.ajax(
            {
              url : "ondemand_driver.php",
              type: "POST",
              data : value,
              success: function() {
                window.location(url); 
              }
            });
          });
      });
  </code></pre>
  
  <p>What is wrong there?</p>