Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Nov 2003
    Location
    Code Heaven
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Automatic Download forwarding...

    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?

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    338
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    setTimeout("window.location.replace('myfile.zip');", 1000*6);
    //start download after 6 seconds
    Hope that helps!

    Happy coding!
    Last edited by nolachrymose; 12-18-2003 at 11:51 PM.

  • #3
    Regular Coder
    Join Date
    Nov 2003
    Location
    Code Heaven
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •