Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old January 23rd, 2006, 07:51 AM
manage manage is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 2 manage User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
quick javascript advice needed

Hi i have two sets of script to put clocks on my website, one shows the time in my customers timezone and the other shows the time related to my website (time in Thailand)
The problem is when i put them both into my dreamweaver webpage only one will show at a time.

How can i change the scripts so both can show at the same time?

here is one of the scripts

<!-- Clock Part 1 - Holder for Display of Clock -->

<span id="tP">&nbsp;</span>
<!-- Clock Part 1 - Ends Here -->
<!-- Clock Part 2 - Put Anywhere AFTER Part 1 -->
<script type="text/javascript">
// Clock Script Generated By Maxx Blade's Clock v2.0d
// http://www.maxxblade.co.uk/clock
function tS(){ x=new Date(tN().getUTCFullYear(),tN().getUTCMonth(),tN() .getUTCDate(),tN().getUTCHours(),tN().getUTCMinute s(),tN().getUTCSeconds()); x.setTime(x.getTime()+25200000); return x; }
function tN(){ return new Date(); }
function lZ(x){ return (x>9)?x:'0'+x; }
function tH(x){ if(x==0){ x=12; } return (x>12)?x-=12; }
function dE(x){ if(x==1||x==21||x==31){ return 'st'; } if(x==2||x==22){ return 'nd'; } if(x==3||x==23){ return 'rd'; } return 'th'; }
function dT(){ document.getElementById('tP').innerHTML=eval(oT); setTimeout('dT()',1000); }
function aP(x){ return (x>11)?'pm':'am'; }
function y4(x){ return (x<500)?x+1900; }
var dN=new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'),m N=new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','A ug','Sep','Oct','Nov','Dec'),oT="dN[tS().getDay()]+' '+tS().getDate()+dE(tS().getDate())+' '+mN[tS().getMonth()]+' '+y4(tS().getYear())+' '+':'+':'+' '+tH(tS().getHours())+':'+lZ(tS().getMinutes())+': '+lZ(tS().getSeconds())+' '+aP(tS().getHours())";
if(!document.all){ window.onload=dT; }else{ dT(); }
</script>
<!-- Clock Part 2 - Ends Here -->

any help is appreciated






Reply With Quote
  #2  
Old January 23rd, 2006, 08:19 AM
asim0s asim0s is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: nicosia,cyprus
Posts: 48 asim0s User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 3 m 31 sec
Reputation Power: 2
Send a message via ICQ to asim0s Send a message via Yahoo to asim0s
RE: quick javascript advice needed

just to clarify something you mean it doesnt work in the browser? cause that dreamweaver part got me a bit confused

Reply With Quote
  #3  
Old January 23rd, 2006, 10:16 AM
manage manage is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 2 manage User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: quick javascript advice needed

Hi thanks for your reply

basically i have this code twice, one makes a clock that shows the GMT time + 7 hrs, the other takes the local time of the person viewing my website. (same code but edited to suit the two timezones)

i use Dreamweaver to make my webpages and i have put the two seperate clocks into two seperate cells of a table. but whenever i try to view the clocks in a browser only one will ever show, i presume there is something conflicting where two instances of this code cant work together in one html file.

I hope this makes sence to you!

again thanks for any help

Reply With Quote
  #4  
Old January 23rd, 2006, 10:27 AM
System System is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Posts: 665 System User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Message Moved

Thread moved from 'Support and Suggestions' to 'Client Side Things' by tkarkkainen.

Reason: Not a problem with Codewalkers

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > quick javascript advice needed


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT