title: How to download a file from a url with Javascript?
body: <p>How to download a file from a url with Javascript?</p>
  
  <p>I'm trying to get from a textfield a user enters a url as follows:</p>
  
  <pre><code>new Ext.form.TextField({
                  disabled: false,
                          fieldLabel: "file",
                          value:'',
              id:"url"};
  </code></pre>
  
  <p>and I need the value of this variable is the file contained in the above url I am trying as follows:</p>
  
  <pre><code>var file1 = new OpenLayers.WPS.ComplexPut({
                        identifier: "file1",
                        value: window.location.href = document.getElementById("url")
  </code></pre>