site Search:


 
    All Forums Hot Topics Gallery






how-to block ads


 
Search Topic:
Share Topic
Posting?
Post a:
Post a:
Links: ·How To Get Noticed ·Web Monks FAQ ·Webhosting FAQ ·Posting Code ·How To Post ·Webhosting forum
AuthorAll Replies


cowboyro

join:2000-10-11
Shelton, CT
Reviews:
·AT&T U-Verse

2 edits

reply to franzcatch

Re: Opening a file download dialog from a JavaScript function.

in the HEAD section:
<script type="text/javascipt">
function startDownload()
{
var url='http://server/folder/file.ext';  
window.open(url,'Download');
}
</script>
 
in BODY
<script type="text/javascipt">
setTimeout("startDownload()",5000); //starts download after 5 seconds
</script>
 

or if you have just 1 download location you can combine the 2 in the body:

<script type="text/javascipt">
setTimeout("window.open('http://server/folder/file.ext','Download')",5000); 
</script>
 

Edit: I wouldn't worry so much about the 0.01% that are paranoid and turn off javascript... But *do* provide a link in case a popup blocker kills the download.

Monday, 20-May 09:05:30 Terms of Use & Privacy | feedback | contact | Hosting by nac.net - DSL,Hosting & Co-lo
over 13.5 years online © 1999-2013 dslreports.com.
Most commented news this week
Hot Topics