Javascript dilema

Discussion in 'General troubleshooting' started by Paul Rothenheber, Oct 9, 2014.

  1. I currently am using the following script to successfully do a Download. I want this download to be moved into a specific folder lets say "C:\HTESInc".

    What do I need to add to this logic to save this download file to C:\HTESInc ?


    <script type="text/javascript">
    window.onload = function () {
    document.location = '/HTESPublish/HTESZipMe.zip';
    }
    </script>
     
  2. I know that's just an example, but you can't write to C: on the server.

    To get the full path to a directory in your account go to the Site Info section of Control Panel and look for the Path to root. It will be E:\web\something\

    Add that path (including the name of your download dir at the end, of course) to your document.location.
     
    Last edited: Oct 14, 2015

Share This Page