Results 1 to 2 of 2

Thread: Countdown Script

  1. #1
    Join Date
    Dec 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Countdown Script

    1) Script Title: Dynamic Countdown Script

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

    3) Describe problem: I want to know if I could make it so only the graphical countdown one shows. I do not want the text countdown to show. Could anyone help me out here?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    This from the demo page (Step 2):

    Code:
    <div id="countdowncontainer"></div>
    <br />
    <div id="countdowncontainer2"></div>
    
    <script type="text/javascript">
    
    var futuredate=new cdtime("countdowncontainer", "March 23, 2009 18:25:00")
    futuredate.displaycountdown("days", formatresults)
    
    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>
    contains two calls to the main script preceded by their respective containers. One set is in green, the other in red. If you want only one, pick the one you want, edit it to your desired date and get rid of the other one.

    To answer your question another way, just use the 'formatresults2' version.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •