PDA

View Full Version : Help with altering script



LadyEye
09-03-2006, 03:20 PM
I am wondering if someone could help me alter this script. I use it on my site for today's date, the font color is black, I would really like the font color to be white and well I am just not sure what I can do to have it in white. If anyone is willing to re-write it for me I would appreciate it.

Thanks


<script language="JavaScript" type="text/javascript">
<!--
var
month = new Array();
month[0]="January";
month[1]="February";
month[2]="March";
month[3]="April";
month[4]="May";
month[5]="June";
month[6]="July";
month[7]="August";
month[8]="September";
month[9]="October";
month[10]="November";
month[11]="December";
var
day = new Array();
day[0]="Sunday";
day[1]="Monday";
day[2]="Tuesday";
day[3]="Wednesday";
day[4]="Thursday";
day[5]="Friday";
day[6]="Saturday";
today = new Date();
date = today.getDate();
day = (day[today.getDay()]);
month = (month[today.getMonth()]);
year = (today.getFullYear());
suffix = (date==1 || date==21 || date==31) ? "st" : "th" &&
(date==2 || date==22) ? "nd" : "th" && (date==3 || date==23) ? "rd" : "th"
function print_date()
{
document.write(day + "," + "&nbsp;" + date + "<sup>" + suffix + "</sup>" + "&nbsp;" +
month + "," + "&nbsp;" + year);
}
// -->
</script>
<script>
<!--
print_date();
//-->
</script>

Collectors-info
09-03-2006, 04:58 PM
Hi, you can do this in page properties if you want. Use the sript as you have been & then as below.

Open page properties.
Select background
Select the text colour.
Chris.

LadyEye
09-03-2006, 05:39 PM
Thanks Chris

But it is not the background color or font on my pages that I want changed, it is the font color in the actual date that this script provides.

This script simply gives me a line that says

Sunday, September 03, 2006 (and changes everyday on it's own)

It appears in Black, since my pages are black I wanted it to appear in White font .... so that it would show on the black page (I have it now on part of my red on the page, but wanted to move it around to the black.

ez-ez
09-03-2006, 05:49 PM
Thanks Chris

But it is not the background color or font on my pages that I want changed, it is the font color in the actual date that this script provides.

This script simply gives me a line that says

Sunday, September 03, 2006 (and changes everyday on it's own)

It appears in Black, since my pages are black I wanted it to appear in White font .... so that it would show on the black page (I have it now on part of my red on the page, but wanted to move it around to the black.

Hi LadyEye..

The script as you requested:

<FONT style="FONT-SIZE:10pt" color="#FFFFFF" face="Tahoma"><b>
<script language="JavaScript" type="text/javascript">
<!--
var
month = new Array();
month[0]="January";
month[1]="February";
month[2]="March";
month[3]="April";
month[4]="May";
month[5]="June";
month[6]="July";
month[7]="August";
month[8]="September";
month[9]="October";
month[10]="November";
month[11]="December";
var
day = new Array();
day[0]="Sunday";
day[1]="Monday";
day[2]="Tuesday";
day[3]="Wednesday";
day[4]="Thursday";
day[5]="Friday";
day[6]="Saturday";
today = new Date();
date = today.getDate();
day = (day[today.getDay()]);
month = (month[today.getMonth()]);
year = (today.getFullYear());
suffix = (date==1 || date==21 || date==31) ? "st" : "th" &&
(date==2 || date==22) ? "nd" : "th" && (date==3 || date==23) ? "rd" : "th"
function print_date()
{
document.write(day + "," + "&nbsp;" + date + "<sup>" + suffix + "</sup>" + "&nbsp;" +
month + "," + "&nbsp;" + year);
}
// -->
</script>
<script>
<!--
print_date();
//-->
</script>

LadyEye
09-03-2006, 06:45 PM
Carlos thank you ever so much ... you're "special" 4 sure ....

And it was broke, lol, and you fixed it and I won't break it !!

Thank you thank you thank you!!

Happy Camper!!

Awe ... it's lovely ... I just tried it already on one page and it is exactly what I wanted ..... muwah!!

Collectors-info
09-03-2006, 09:51 PM
Thanks Chris

But it is not the background color or font on my pages that I want changed, it is the font color in the actual date that this script provides.

This script simply gives me a line that says

Sunday, September 03, 2006 (and changes everyday on it's own)

It appears in Black, since my pages are black I wanted it to appear in White font .... so that it would show on the black page (I have it now on part of my red on the page, but wanted to move it around to the black.

Hi Ladyeye. Must admit I am not sure how this part works in BV. But when you use this part for changing text, it only seems to change anything that you have added in script form & doesn’t seem to affect any of the main text on the page. I use it for changing the time & date/copyright parts on my pages, & it only seems to change those parts.
Bit like this one. http://www.collectors-info.com/bike.html (http://www.collectors-info.com/bike.html) But you may have other html boxes on the page I assume it may do the same to these.
Might be handy for another page or a later date?

Chris.

LadyEye
09-04-2006, 05:16 AM
Hey Chris

Thanks so much, I'll keep that in mind ... you have a cool site ... do you do all that travelling on your bike? Sounds exciting!!

ez-ez
09-04-2006, 06:28 AM
Carlos thank you ever so much ... you're "special" 4 sure ....

And it was broke, lol, and you fixed it and I won't break it !!

Thank you thank you thank you!!

Happy Camper!!

Awe ... it's lovely ... I just tried it already on one page and it is exactly what I wanted ..... muwah!!

Welcome.. and thank you LadyEye.. Glad got to work with you.. such a delight.

Collectors-info
09-04-2006, 09:23 AM
Hey Chris

Thanks so much, I'll keep that in mind ... you have a cool site ... do you do all that travelling on your bike? Sounds exciting!!

Hi! We done quite a few trips around Europe & i thought we should get a site going that we can use for future trips. A type of blogg on our holidays & ones to come. Only in its early stages at the moment.


Chris.