|
|||||||
| JavaScript JavaScript (not Java) Discussion and technical support, including AJAX and frameworks (JQuery, MooTools, Prototype...) |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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, |
|
#2
|
|||
|
|||
|
Which do you want help on, the link you gave or the index.html?
|
|
#3
|
|||
|
|||
|
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.
|
|
#4
|
|||
|
|||
|
Quote:
<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> |
|
#5
|
|||
|
|||
|
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. |
|
#6
|
|||
|
|||
|
Thanks for the advice and saving me any more time trying to figure out this mess.
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|