title: How to specify download location in Html using JavaScript
body: <p>is it possible to specify the download location for a file from a Html page using JavaScript?</p>
  
  <p>the function I am currently using to down my file is provided below. </p>
  
  <pre><code>function saveTextAsFile()
  {      
      var textToWrite = document.getElementById("inputTextToSave").value;
      var textFileAsBlob = new Blob([textToWrite], {type:'xlsx'});
      var fileNameToSaveAs = "NAME.csv";
      var downloadLink = document.createElement("a");
      downloadLink.download = fileNameToSaveAs;
      window.URL = window.URL || window.webkitURL;
      downloadLink.href = window.URL.createObjectURL(textFileAsBlob);
      downloadLink.onclick = destroyClickedElement;
      downloadLink.style.display = "none";
      document.body.appendChild(downloadLink);
      downloadLink.click();
  }
  </code></pre>
  
  <p>Thanks for your help in advance. </p>