Hi I have a script which allows for downloads when the page is visited and link is clicked. I want to edit things so that once the link is clicked the download will start as specified the javascripts but it will then start download and direct to a thank you page. Here is an examaple:
The sample of the page and Javascript coding can be found here by inspecting the source code of the page http://www.mynetdownload.com/testdwld.html
Once a download is starting, the 'current' page is the file that is downloading, so you will no longer have 'control' over the browser.
You should therefore reverse that;
Because the 'download' is not shown inside the browser, the thank you page will remain visible during the download process.
Redirecting to the file-download can be done via a regular HTML redirect header in your <head>
:
E.g. To have the download (redirect) start after 10 seconds:
<meta http-equiv="refresh" content="10; url=http://example.com/downloads/file1.zip">