XMLHttpRequest not redirecting the site

I am trying to redirect and open a site using XMLHttpRequest from a ColdFusion page
Here is my code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Pass Login</title>
<script type="text/javascript">
var url = 'https://bi.mySite.com/cf/';
var xhr = createCORSRequest('GET', url);
xhr.setRequestHeader('X-User-Header', '#userId#');
if (xhr){
    xhr.onload = function(){
        //do something with request.responseText
        if(xhr.status === 200){

function createCORSRequest(method, url) {
  var xhr = new XMLHttpRequest();
  if ("withCredentials" in xhr) {
    // XHR for Chrome/Firefox/Opera/Safari.
    xhr.open(method, url, true);
  } else if (typeof XDomainRequest != "undefined") {
    // XDomainRequest for IE.
    xhr = new XDomainRequest();
    xhr.open(method, url);
  } else {
    // CORS not supported.
    xhr = null;
  return xhr;

I am getting 200 code in chrome but it is not opening the site.
Am I missing something?