Results 1 to 6 of 6

Thread: Please Read, Need Download Script

  1. #1
    Join Date
    Apr 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow Please Read, Need Download Script

    I wanted a download script such as a conter script, like if somebody clicks on a download link a pop shows up telling them to wait 30 seconds (and shows a graphical status bar or shows how many seconds left) and when time counts down the link appears, sort of like the timeout code RapdiShare/Megaupload have.

    I had a similar script quite some time ago but I shut down the site without backing up the code,

    It was something like this:

    <script>var c = 58; fc(); function fc(){
    if(c>0){document.getElementById("dl").innerHTML = "Please Wait For Link To Load".</script>

    <!-- hide
    function timer(url) {
    setTimeout("print();", 10000);
    }

    // -->

    <!-- hide

    function print(url) {
    document.getElementById("dl").innerHTML = unescape('AFTER TIMEOUT IS DONE');

    }

    // -->

    </script>

    Thanks!!!!!

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    What possible reason? That sounds like an awful plan.

    "I want it to look like I'm like those idiotic hosting companies"

    No offense, but I just don't get this.

    If you can just let people download, what possible reason would you have for not letting them do so? The other companies are 1. trying to get money or 2. waiting for servers to be ready.

    In short, you could make a page that counts (not too hard, but not sure exactly how, myself) and use a meta refresh tag.
    <meta http-equiv="refresh" content="30;url=http://nextpage.com/">
    That 30 will make it take 30 seconds for it to refresh to the next page.
    (note: must go between the <head> and </head> commands on your page)

    Easy to get around, but so would be any JS.

    Plus, the above ISN'T JS, so it's totally compatible.


    And there are a couple 'loading bar' scripts on DD. Just look to see if any work for you.

  3. #3
    Join Date
    Apr 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    because they kill my bandwidth and I want the people to know how long they still need to wait for before the link shows up

  4. #4
    Join Date
    Apr 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    please guys i need it, and here it is again with the javascript mr professor:

    <script language="JavaScript">

    <!-- hide
    function timer(url) {
    setTimeout("print();", 10000);
    }

    // -->

    <!-- hide

    function print(url) {
    document.getElementById("dl").innerHTML = unescape('<p align="center">AFTERTIMEOUT</a></p>');

    }

    // -->

    </script>

  5. #5
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Try:

    Code:
    <script>
    var waitnum = 60
    var nextloc = "wherever.htm"
    function waitForDownload(){
    if (waitnum==0) {
    document.getElementById("wait").innerHTML = "Downloading File..."
    window.location=nextloc
    }
    else {
    waitnum--
    document.getElementById("wait").innerHTML = "Please wait "+waitnum+" to complete the download"
    }
    }
    setInterval("waitForDownload()",1000)
    </script>
    and...
    HTML Code:
    <div id="wait"></div>
    Note: Haven't tried it yet
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  6. #6
    Join Date
    Apr 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks alot worked great!

Bookmarks

Posting Permissions

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