vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Database of Codes/Hacks/Mods :: Time in Menu Bar - View Topic (Page 1 of 2)Page: 1 2
Topic Rating: *****
Printable View
Danny
Full Member
***

[Avatar]

Posts: 180
Status: Offline
Gender: Male
Location: Durham
Age: 33
Joined:  
Reputation: 1%  


pmmsnxfire
Time in Menu Bar (30th Dec 07 at 3:01am UTC)
Global Header

Preview

No need to edit {Smile}

Code:
 
  1. <script type="text/javascript">
  2. <!--
  3. /*Time to the left of menu butons by Danny*/
  4.  
  5. function startTime(){
  6. var today=new Date()
  7. var h=today.getHours()
  8. var m=today.getMinutes()
  9. var s=today.getSeconds()
  10. m=checkTime(m)
  11. s=checkTime(s)
  12. document.getElementById('time').innerHTML=h+":"+m+":"+s
  13. t=setTimeout('startTime()',500)}
  14. function checkTime(i){
  15. if (i<10) {
  16. i="0" + i}
  17. return i}
  18.  
  19. var menu = document.getElementById('welcome_table').getElementsByTagName('td')[2];
  20.  
  21. menu.innerHTML = '<span style="float:right;" id="time"></span>' + menu.innerHTML;
  22.  
  23. window.onload = startTime();
  24.  
  25. //-->
  26. </script>
 

Myspace | deviantART

"Suffer For Your Art"
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Time in Menu Bar (30th Dec 07 at 3:02am UTC)
have you tested this?
Danny
Full Member
***

[Avatar]

Posts: 180
Status: Offline
Gender: Male
Location: Durham
Age: 33
Joined:  
Reputation: 1%  


pmmsnxfire
Re: Time in Menu Bar (30th Dec 07 at 3:06am UTC)
yeah il add a preview {Smile}

Myspace | deviantART

"Suffer For Your Art"
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Time in Menu Bar (30th Dec 07 at 3:09am UTC)
looks good! {Smile}
Danny
Full Member
***

[Avatar]

Posts: 180
Status: Offline
Gender: Male
Location: Durham
Age: 33
Joined:  
Reputation: 1%  


pmmsnxfire
Re: Time in Menu Bar (30th Dec 07 at 3:09am UTC)
thanks man {Smile}

Myspace | deviantART

"Suffer For Your Art"
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 32
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: Time in Menu Bar (30th Dec 07 at 3:42am UTC)
Just so you know, the time shows up to the right of the menu buttons, not the left. {Wink}

rroll.to— Shorten a link, rickroll your friends.
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Time in Menu Bar (30th Dec 07 at 3:45am UTC)
lol it's coded to go right, but the Copyright says left! {Tongue Out}
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 32
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: Time in Menu Bar (30th Dec 07 at 3:46am UTC)
 
lol it's coded to go right, but the Copyright says left! {Tongue Out}


That's pretty much what I just said. {Wink}

rroll.to— Shorten a link, rickroll your friends.
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Time in Menu Bar (30th Dec 07 at 3:47am UTC)
and I was just reiterating it cause it was funny! >.>
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 32
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: Time in Menu Bar (30th Dec 07 at 3:48am UTC)
 
and I was just reiterating it cause it was funny! >.>


Ahh, that works. {Tongue Out}

rroll.to— Shorten a link, rickroll your friends.
Danny
Full Member
***

[Avatar]

Posts: 180
Status: Offline
Gender: Male
Location: Durham
Age: 33
Joined:  
Reputation: 1%  


pmmsnxfire
Re: Time in Menu Bar (30th Dec 07 at 3:52am UTC)
oops I meant to say right {Tongue Out} I even put float:right; in the code {Tongue Out}

Myspace | deviantART

"Suffer For Your Art"
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 32
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: Time in Menu Bar (30th Dec 07 at 4:16am UTC)
 
oops I meant to say right {Tongue Out} I even put float:right; in the code {Tongue Out}


Haha, no problem. {Smile}

rroll.to— Shorten a link, rickroll your friends.
Samus
Junior Member
**

[Avatar]

Posts: 56
Status: Offline
Gender: Male
Location: Australia
Joined:  
Reputation: 0%  


pmmsnicq
Re: Time in Menu Bar (30th Dec 07 at 4:52am UTC)
menu.innerHTML = '<span style="float:right;" id="time"></span>'+menu.innerHTML+'';

It needs only be;

menu.innerHTML = '<span style="float:right;" id="time"></span>'+menu.innerHTML;

Because, you can't actually add nothing to the end of something. {Tongue Out}

Image
Danny
Full Member
***

[Avatar]

Posts: 180
Status: Offline
Gender: Male
Location: Durham
Age: 33
Joined:  
Reputation: 1%  


pmmsnxfire
Re: Time in Menu Bar (30th Dec 07 at 7:11pm UTC)
just changed it {Smile}

Myspace | deviantART

"Suffer For Your Art"
ManGoneMad
New Member
*

[Avatar]

Posts: 20
Status: Offline
Gender: Male
Location: West Coast of Michigan
Age: 66
Joined:  
Reputation: 0%  


pmwwwvForum
Re: Time in Menu Bar (30th Dec 07 at 11:59pm UTC)
Nice script! {Smile}
Is there any way to have show normal 12 hour time, as opposed to military time?

Image
 Printable View
Page: 1 2

All times are GMT+0 :: The current time is 5:08pm
Page generated in 1.2704 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums