title: Problems with xmlhttprequest status 302
body: <p>I am trying to get real path in link megaupload but always but this dont work.</p>
  
  <pre><code>function getRealURL(){
  
      var st = new String(""); 
      var req = new XMLHttpRequest();
      req.open("GET","http://www.megaupload.com/?d=6CKP1MVJ",true);
      req.send(null);
      req.send(null);
      req.onreadystatechange = function (aEvt) {
       if (req.readyState == 4) {
          if(req.status == 302){
            //SUCESSO
             st = req.responseText;
          }
        }
      };//funcao
  
      element.getElementById("id").setAttribute("value", st);
  
  }
  </code></pre>
  
  <p>i need this link:</p>
  
  <pre><code>Redirect to: http://www534.megaupload.com/files/c2c36829bc392692525f5b7b3d9d81dd/Coldplay - Warning Sign.mp3
  </code></pre>
  
  <p>insted of this: </p>
  
  <pre><code>http://www.megaupload.com/?d=6CKP1MVJ
  </code></pre>