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 2 of 2)Page: 1 2
Topic Rating: *****
Printable View
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 (31st Dec 07 at 12:00am UTC)
Post a request to have it changed! {Wink}

it'd be sooo much easier! {Tongue Out}
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 (31st Dec 07 at 12:10am UTC)
Ok, Thanks will do!

Image
Danny
Full Member
***

[Avatar]

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


pmmsnxfire
Re: Time in Menu Bar (31st Dec 07 at 12:19am UTC)
you mean so after 12 o clock it goes back to 1 each time ?

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 (31st Dec 07 at 12:20am UTC)
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. e = 'am'
  13. if(h=="12"){
  14. e = "pm";
  15. }
  16. if(h=='0'){
  17. h="12";
  18. }else if(h>12){
  19. h=parseInt(h - 12);
  20. e = "pm"
  21. }
  22.  
  23.  
  24. document.getElementById('time').innerHTML=h+":"+m+":"+s + " " + e
  25. t=setTimeout('startTime()',999)}
  26. function checkTime(i){
  27. if (i<10) {
  28. i="0" + i}
  29. return i}
  30.  
  31. var menu = document.getElementById('welcome_table').getElementsByTagName('td')[2];
  32.  
  33. menu.innerHTML = '<span style="float:right;" id="time"></span>' + menu.innerHTML;
  34.  
  35. window.onload = startTime();
  36.  
  37. //-->
  38. </script>
 


{Smile} Editted, hope you don't mind Danny... Feel free to clean up the code! {Tongue Out}
ajay
Guest
Re: Time in Menu Bar (20th Feb 08 at 3:58pm UTC)
Thanks for the code!
 Printable View
Page: 1 2

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