View Full Version : Automatic Download forwarding...

Code Wizard
12-18-2003, 09:15 PM
In some sites,when you want to download a file,you go to a page wich will start the download after x secs have passed.
How can I do this with JavaScript?

12-18-2003, 09:20 PM
setTimeout("window.location.replace('myfile.zip');", 1000*6);
//start download after 6 seconds

Hope that helps!

Happy coding! :)

Code Wizard
12-18-2003, 09:26 PM
haha yes!!! Thx man!
This just proves that I haven't checked new JS methods lately,the replace method is tottaly new to me tho!!