![Lengel546](https://vmapp.org/images/player/000default.jpg)
: Redirect AFTER Initiating download I have a question - is there any way to initiate a download and AFTER the user has confirmed the download then redirect to another site? Is something like
I have a question - is there any way to initiate a download and AFTER the user has confirmed the download then redirect to another site?
Is something like that possible via ASP or another language commonly used for websites?
Bad PHP "user experience" scenario (In use right now)
a) User comes to site, clicks download button
b) Users sees "download" landing page, gets redirected after 5
seconds
c) Download starts on Thankyoupage
Good "user experience" scenario: (my dream solution, what I want)
a) User comes to site, clicks download button
b) Download starts immediately on landing page
c) Download confirmed, redirects now to thank you page
Any programming language is a go for this.
More posts by @Lengel546
1 Comments
Sorted by latest first Latest Oldest Best
I do exactly this with javascript.
I have this in the header of my site:
function SetUpRedirect(destination)
{
setTimeout("window.location='http://www.foo.com/download.htm?file="+destination+"'",3000);
return true;
}
My download links look like this:
<a href="/downloads/foo.exe" title="Download Foo" onclick="SetUpRedirect('foo.exe')" class="funky_button_class">Download Now!</a>
Then my download page (download.htm) takes the file parameter and records it to a database plus provides a static link to the download. It does this with some fairly trivial PHP.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2025 All Rights reserved.