Results 1 to 2 of 2

Thread: Universal Countdown Clock

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

    Default Universal Countdown Clock

    1) Script Title: Universal Countdown Clock

    2) Script URL (on DD):

    http://www.dynamicdrive.com/dynamici...lcountdown.htm

    3) Describe problem:

    I need to use the clock on more than one place on the same page... When I enter the javascript for the first clock it works fine, but when I try to use it in additional places it simply doesn't show up.

    You can see it working fine at the top here, but then when you scroll down to the next one it's blank:

    http://howtoburnfat.com/guys-discount.php

    Any ideas?

    Thanks,

    Sean

  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

    To get more than one of these on a page, certain parts of the call must be unique, otherwise you are just calling the same thing over again and it will try to write to the same place. For example, your second one should be (at least you already have a different id for the division):

    Code:
                        <div id="cdcontainer2"></div>
                <script type="text/javascript">
    //cdLocalTime("ID_of_DIV_container", "server_mode", LocaltimeoffsetMinutes, "target_date", "opt_debug_mode")
    //cdLocalTime.displaycountdown("base_unit", formatfunction_reference)
    
    //Note: "launchdate" should be an arbitrary but unique variable for each instance of a countdown on your page:
    
    var launchdate2=new cdLocalTime("cdcontainer2", "server-php", -180, "August 8, 2008 18:00:00")
    launchdate2.displaycountdown("days", formatresults2)
                </script>
    - 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
  •