Results 1 to 5 of 5

Thread: Displaying multiple live clocks on a page

  1. #1
    Join Date
    Jan 2009
    Location
    In a house
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Displaying multiple live clocks on a page

    Anyone:

    What would a javascript look like if I wanted to display 5 different live clocks (timezones) across the top of my web page?

    With the zones being: Washington, DC; London; Berlin; Baghdad; Kabul

    Any help with this would be greatly appreciated. I've found several scripts online in other areas, but I am looking for one that will display multiple text clocks (not analog) in a line as a header across the page.

    Thanks!
    HopiBuddha

  2. #2
    Join Date
    Aug 2008
    Location
    Smiths, AL
    Posts
    164
    Thanks
    30
    Thanked 5 Times in 5 Posts

    Default

    http://www.dynamicdrive.com/dynamicindex6/clock2.htm

    Use this script and just change the name of the onLoad

    HTML Code:
    <body onLoad="show_clock(), show_clock2(), show_clock3(), show_clock4(), show_clock5()">
    make sure you change the names in the .js files.
    ___________________________________

    Still working on it!

  3. #3
    Join Date
    Jan 2009
    Location
    In a house
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Like this?

    // The main part of the script:
    function show_clock() {
    if (old == "die") { return; }
    function show_clock2() {
    if (old == "die") { return; }
    function show_clock3() {
    if (old == "die") { return; }


    I have a feeling I don't know enough about JavaScript; still can't get it to work.

    Any ideas?
    HopiBuddha

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,127
    Thanks
    44
    Thanked 3,228 Times in 3,189 Posts
    Blog Entries
    12

    Default

    Neither the Dynamic Drive Live Clock script:

    http://www.dynamicdrive.com/dynamicindex6/clock2.htm

    nor the one from that other thread:

    http://www.dynamicdrive.com/forums/showthread.php?t=131

    can handle more than one clock.

    You would need something like:

    http://www.dynamicdrive.com/dynamicindex6/localtime.htm

    which requires that you have a server side language available to you on your host (like PHP or asp, etc.) in order to get the server time. Do you have that?
    - John
    ________________________

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

  5. #5
    Join Date
    Jan 2009
    Location
    In a house
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No I don't have either php or ASP enabled on the webserver, and cannot do it since I am not in charge of it. I've tried this script also and talked with the web server admin's to see if they would change through IIS but they won't...not sure why. Do you know of any other script that could possibly get the clocks operational?

    hopibuddha

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
  •