www.webdeveloper.com
Recent Articles
  • Finding Slow Running Queries in ASE 15
  • A More Advanced Pie Chart for Analysis Services Data
  • Adobe AIR Programming Unleashed: Working with Windows
  • Performance Testing SQL Server 2008's Change Data Capture Functionality
  • The ABC's of PHP: Introduction to PHP
  • How to Migrate from BasicFiles to SecureFiles Storage
  • Why the Twitter Haters Are Wrong
  • User Personalization with PHP: Beginning the Application
  • Whats in an Oracle Schema?
  • Lighting Enhancement in Photoshop
  •  

    Go Back   WebDeveloper.com > Client-Side Development > JavaScript

    JavaScript JavaScript (not Java) Discussion and technical support, including AJAX and frameworks (JQuery, MooTools, Prototype...)

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1  
    Old 11-06-2009, 03:34 PM
    ljford ljford is offline
    Registered User
     
    Join Date: Nov 2009
    Posts: 4
    Cannot get my external clocks to work

    I have a website: www.forexpe.com I was told by the company I work for that I cannot have an actual website promoting my business until I quit my job. I'm not ready to quity yet, so they said I have to change my web site to 'Under Construction". I have a timer that counts down the number of days until I plan to go live and it works fine. I also have a listing of times at the bottom of the page where I visit and would like them to update along with my counter without having to refresh my page every second. Can anyone fix this issue for me if I send you my index.html page?
    Thanks,
    Reply With Quote
      #2  
    Old 11-06-2009, 10:59 PM
    justinbarneskin justinbarneskin is offline
    Registered User
     
    Join Date: Oct 2006
    Posts: 529
    Which do you want help on, the link you gave or the index.html?
    Reply With Quote
      #3  
    Old 11-07-2009, 08:06 AM
    ljford ljford is offline
    Registered User
     
    Join Date: Nov 2009
    Posts: 4
    Quote:
    Originally Posted by justinbarneskin View Post
    Which do you want help on, the link you gave or the index.html?
    I need help getting the code to work inside the index. You can see from looking at the link that the times at the bottom of the link don't update unless you refresh the page. Thanks.
    Reply With Quote
      #4  
    Old 11-07-2009, 08:21 AM
    ljford ljford is offline
    Registered User
     
    Join Date: Nov 2009
    Posts: 4
    Quote:
    Originally Posted by ljford View Post
    I need help getting the code to work inside the index. You can see from looking at the link that the times at the bottom of the link don't update unless you refresh the page. Thanks.
    If you look at the link: www.forexpe.com you will see what works and what doesn't. Here is the code that works for the large numbers:
    <head>

    <title>Under Construction</title>
    <style type="text/css">/*<![CDATA[*/
    @import "css/style.css";
    @import "js/jquery.countdown.css";
    img {behavior:url('js/iepngfix.htc') !important;}
    /*]]>*/</style>

    <script src="http://code.jquery.com/jquery-latest.pack.js" type="text/javascript"></script>
    <script src="js/jquery.countdown.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(function () {
    var austDay = new Date();
    austDay = new Date(austDay.getFullYear(2009) + 2, 1 - 5, 26);
    $('#defaultCountdown').countdown({until: austDay});
    $('#year').text(austDay.getFullYear());
    });
    </script>
    <!--[if lte IE 6]>
    <script type="text/javascript" src="js/supersleight-min.js"></script>
    <![endif]-->
    </head>

    And here is the code that doesn't work. I'm just not sure how to use the code above to make the code below work. Thanks.

    <table align="center" width="80%">
    <tr>
    <td><script type="text/javascript" language="javascript">

    ourDate = new Date();
    document.write(ourDate.toGMTString() + " ");
    function checkTime(i)
    {if (i,10)
    {
    i="0" + i;
    }
    return i;
    }
    </script></td>

    <td><script type="text/javascript" language="javascript">
    var currentTime = new Date()
    var hours = currentTime.getHours()
    var minutes = currentTime.getMinutes()
    hours +=3;
    if (hours > 23)
    hours = hours-24;
    if (hours <= 9)
    hours = "0" + hours;
    if (minutes <= 9)
    minutes = "0" + minutes;
    document.write("New York " + " " + hours + ":" + minutes + " " );
    function checkTime(i)
    {if (i,10)
    {
    i="0" + i;
    }
    return i;
    }
    </script>
    </td>
    <td>
    <script type="text/javascript" language="javascript">
    var currentTime = new Date()
    var hours = currentTime.getHours()
    var minutes = currentTime.getMinutes()
    hours +=7;
    if (hours > 23)
    hours = hours-24;
    if (hours <= 9)
    hours = "0" + hours;
    if (minutes <= 9)
    minutes = "0" + minutes;
    document.write("London " + " " + hours + ":" + minutes + " " );
    function checkTime(i)
    {if (i,10)
    {
    i="0" + i;
    }
    return i;
    }
    </script>
    Reply With Quote
      #5  
    Old 11-07-2009, 03:57 PM
    justinbarneskin justinbarneskin is offline
    Registered User
     
    Join Date: Oct 2006
    Posts: 529
    Those time zone scripts are too dicey, consider abandoning it?
    Googling "world times scripts" returns http://www.javascriptkit.com/script/cut47.shtml

    You can play around with it until you discover it doesn't work either.
    Reply With Quote
      #6  
    Old 11-07-2009, 06:54 PM
    ljford ljford is offline
    Registered User
     
    Join Date: Nov 2009
    Posts: 4
    Thanks for the advice and saving me any more time trying to figure out this mess.
    Reply With Quote
    Reply

    Bookmarks


    Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
     
    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is Off
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 11:58 PM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy

    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.