Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-13-2011, 05:59 AM   PM User | #1
sam133
New to the CF scene

 
Join Date: Nov 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
sam133 is an unknown quantity at this point
Help needed with display format

Hi

I've been struggling to make the output of the script bigger. Ideally. I'd like it to be around 75pt. Could someone please tell me how to do it?

Thanks in anticipation.

<!-- 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 timeSource(){
x=new Date(timeNow().getUTCFullYear(),timeNow().getUTCMonth(),timeNow().getUTCDate(),timeNow().getUTCHours (),timeNow().getUTCMinutes(),timeNow().getUTCSeconds());
x.setTime(x.getTime()+14400000);
return x;
}
function timeNow(){
return new Date();
}
function leadingZero(x){
return (x>9)?x:'0'+x;
}
function dateEnding(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 displayTime(){
window.status=''+eval(outputTime)+'';
document.title=''+eval(outputTime)+'';
document.getElementById('tP').innerHTML=eval(outputTime);
setTimeout('displayTime()',1000);
}
function fixYear4(x){
return (x<500)?x+1900:x;
}
var dayNames=new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
var monthNames=new Array('January','February','March','April','May','June','July','August','September','October','Novem ber','December');
var outputTime="dayNames[timeSource().getDay()]+' '+timeSource().getDate()+dateEnding(timeSource().getDate())+' '+monthNames[timeSource().getMonth()]+' '+fixYear4(timeSource().getYear())+' '+':'+':'+' '+leadingZero(timeSource().getHours())+':'+leadingZero(timeSource().getMinutes())+':'+leadingZero(ti meSource().getSeconds())";
if(!document.all){ window.onload=displayTime; }else{ displayTime(); }
</script>

<!-- Clock Part 2 - Ends Here -->
sam133 is offline   Reply With Quote
Old 11-13-2011, 07:34 AM   PM User | #2
sam133
New to the CF scene

 
Join Date: Nov 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
sam133 is an unknown quantity at this point
Never mind - managed to sort it.

I just changed

<span id="tP">&nbsp;</span>
to
<span id="tP" font-size: 45pt;">&nbsp;</span>

Easy - when you know how!!!
sam133 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:11 PM.


Advertisement
Log in to turn off these ads.