1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Code to make download link appear after 30 seconds?

Discussion in 'HTML & JavaScript' started by paymymortgage4me, Jan 9, 2011.

  1. paymymortgage4me

    paymymortgage4me Junior Member

    Joined:
    Apr 5, 2008
    Messages:
    163
    Likes Received:
    308
    Location:
    I'm An Everywhere Man
    I'm trying to find a code that will make the download link appear after 30 seconds. I'm thinking this is probably pretty easy to do, but I don't know how.

    I'd also like it to countdown the seconds if possible. So it would say something like the following:

    "Your download will be available in 30 seconds"

    It would countdown from 30 to 0 and then the download link would appear. Does anybody know how to do this, or does anybody know of a website that'll show me how to do this?

    Thanks
     
  2. negligence

    negligence Regular Member

    Joined:
    Jan 3, 2010
    Messages:
    256
    Likes Received:
    331
    The information is available, all over the internet :)

    Great response on StackOverflow and how to do it with jQuery available here
     
  3. mward

    mward Newbie

    Joined:
    Oct 19, 2010
    Messages:
    43
    Likes Received:
    3
    Occupation:
    manager
    Location:
    uk
    easy. javascript, start with the link hidden like <a id=link href="" style="display:none">link</a>

    then have a javascript function that runs onload thats has a timer

    Look up SetTimeOut()

    then the syntax would be:

    setTimeOut('showlink()',3000) <- the 3000 is miliseconds.

    function showlink(){
    document.getElementById('link').style.display='';
    }