[support] Go to page after downloading a file

Beatrix Willius bwillius at gmx.de
Sun Feb 5 15:45:43 UTC 2012


I'm trying to add a thank you page after downloading a file to my website at http://www.mothsoftware.com. Because I wasn't able to find a solution within Drupal I added a JavaScript that I found (see below). The script itself works, but the page reloads every few seconds. How do I prevent this? Using Drupal 6.22 with Safari on Mac OS 10.7.

The page is available at http://www.mothsoftware.com/content/test-download-success-page

My JavaScript is pretty limited but the script isn't this complicated:

<script type="text/javascript" charset="utf-8">

var download_url = "http://www.mothsoftware.com/sites/default/files/MailArchiverX271.dmg"

function downloadURL() {
	if (download_url.length != 0 && navigator.appVersion.indexOf('MSIE') == -1) {
		window.location = download_url;
	}
}

if (navigator.appVersion.indexOf('Safari') != -1 ) {
	window.setTimeout(downloadURL, 2500);
} else {
	window.onload = downloadURL;

}
</script>


Mit freundlichen Grüßen/Regards

Trixi Willius

http://www.mothsoftware.com
Mail Archiver X: The email archiving solution for professionals



More information about the support mailing list