Results 1 to 3 of 3

Thread: Dynamic Countdown script

  1. #1
    Join Date
    Oct 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Dynamic Countdown script

    1) Script Title: Dynamic Countdown script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...dhtmlcount.htm

    3) Describe problem: This script displays two countdowns. I have tried just about everything to have only the lower countdown display, but whatever change I make removes the whole lot!

    Here it is on http://www.idealchristmasgift.co.uk/ Can somebody please tell me how to only display the second countdown.

    Cheers

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Your page doesn't load right for me. In general though, to display just the 2nd countdown in the demo, the HTML would look like this:

    Code:
    <div id="countdowncontainer2"></div>
    
    <script type="text/javascript">
    
    var currentyear=new Date().getFullYear()
    //dynamically get this Christmas' year value. If Christmas already passed, then year=current year+1
    var thischristmasyear=(new Date().getMonth()>=11 && new Date().getDate()>25)? currentyear+1 : currentyear
    var christmas=new cdtime("countdowncontainer2", "December 25, "+thischristmasyear+" 0:0:00")
    christmas.displaycountdown("days", formatresults2)
    
    </script>

  3. #3
    Join Date
    Oct 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by ddadmin View Post
    Your page doesn't load right for me. In general though, to display just the 2nd countdown in the demo, the HTML would look like this:
    Thank you! I did try that but must've done a typo or something as it didn't work, but all is fine now.

    You may have had a problem accessing as I was working on the site around the time you posted, so it may be that I was in the middle of moving the files around!

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
  •