Michael Moderator
Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
pmvForum | Re: Time in Menu Bar (31st Dec 07 at 12:00am UTC) | | Post a request to have it changed!
it'd be sooo much easier! | |
|
ManGoneMad New Member
Posts: 20 Status: Offline Gender: Male Location: West Coast of Michigan Age: 66 Joined:
pmwwwvForum | Re: Time in Menu Bar (31st Dec 07 at 12:10am UTC) | | Ok, Thanks will do! | |
|
|
Danny Full Member
Posts: 180 Status: Offline Gender: Male Location: Durham Age: 33 Joined:
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 ? | |
|
|
Michael Moderator
Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
pmvForum | Re: Time in Menu Bar (31st Dec 07 at 12:20am UTC) | | Code: - <script type="text/javascript">
- <!--
- /*Time to the left of menu butons by Danny*/
-
- function startTime(){
- var today=new Date()
- var h=today.getHours()
- var m=today.getMinutes()
- var s=today.getSeconds()
- m=checkTime(m)
- s=checkTime(s)
- e = 'am'
- if(h=="12"){
- e = "pm";
- }
- if(h=='0'){
- h="12";
- }else if(h>12){
- h=parseInt(h - 12);
- e = "pm"
- }
-
-
- document.getElementById('time').innerHTML=h+":"+m+":"+s + " " + e
- t=setTimeout('startTime()',999)}
- function checkTime(i){
- if (i<10) {
- i="0" + i}
- return i}
-
- var menu = document.getElementById('welcome_table').getElementsByTagName('td')[2];
-
- menu.innerHTML = '<span style="float:right;" id="time"></span>' + menu.innerHTML;
-
- window.onload = startTime();
-
- //-->
- </script>
Editted, hope you don't mind Danny... Feel free to clean up the code! | |
|
ajay Guest | Re: Time in Menu Bar (20th Feb 08 at 3:58pm UTC) | | Thanks for the code! | |
|