Java Script question on posting the date and adjusting the font

M

Mark M S

I am not a programmer so any direction is appreciated. I found some code to
post the current date on my Web page I will add it at the end here.

I pasted it into a table. I would prefer to adjust the size of the font
smaller and I haven't a clue how. This is pasted into the body and am using
Frontpage 2003

<CENTER>
<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
var days = new Array(8);
days[1] = "Sunday";
days[2] = "Monday";
days[3] = "Tuesday";
days[4] = "Wednesday";
days[5] = "Thursday";
days[6] = "Friday";
days[7] = "Saturday";
var months = new Array(13);
months[1] = "January";
months[2] = "February";
months[3] = "March";
months[4] = "April";
months[5] = "May";
months[6] = "June";
months[7] = "July";
months[8] = "August";
months[9] = "September";
months[10] = "October";
months[11] = "November";
months[12] = "December";
var dateObj = new Date(document.lastModified)
var wday = days[dateObj.getDay() + 1]
var lmonth = months[dateObj.getMonth() + 1]
var date = dateObj.getDate()
var fyear = dateObj.getYear()
if (fyear < 2000)
fyear = fyear + 1900
document.write(wday + ", " + lmonth + " " + date + ", " + fyear)
// End -->
</SCRIPT>
</CENTER>
*************************************************
Mark M Simonian MD FAAP
Medical Director, ChildNet Medical Assoc.
681 Medical Center Drive West #106
Clovis, CA 93611
(559) 325-6850
(e-mail address removed)
www.markmsimonian.medem.com
www.msimonianmd.com
****************************************
Alert: This email and any files transmitted with it
are intended solely for the use of the individual or
entity to whom they are addressed and may contain
confidential, patient health or other legally
privileged information. If you have received this
email in error please notify the sender by email,
delete and destroy this message and its attachments.
Any unauthorized review, use, disclosure,
or distribution is prohibited.
 
G

Guest

Have you tried putting a <font> tag in front of the <center> tag, with the
sizes defined as you want? If that doesn't work, you might have to rework it
so that it actually calls the function from the header, and then put the font
tag around the call to it in the body.
 
J

Jon Spivey

Hi Mark,
That script is just going to spit out the date, you can add whatever tags
you like around it to format it. For example
<span style="font-size: 10px;">
....put your script here
</span>

Will make the text 10px - you can also change fonts' colours etc

Jon
 
M

Mark M S

Perfect ! Thanks a bunch, it works.

*************************************************
Mark M Simonian MD FAAP
Medical Director, ChildNet Medical Assoc.
681 Medical Center Drive West #106
Clovis, CA 93611
(559) 325-6850
(e-mail address removed)
www.markmsimonian.medem.com
www.msimonianmd.com
****************************************
Alert: This email and any files transmitted with it
are intended solely for the use of the individual or
entity to whom they are addressed and may contain
confidential, patient health or other legally
privileged information. If you have received this
email in error please notify the sender by email,
delete and destroy this message and its attachments.
Any unauthorized review, use, disclosure,
or distribution is prohibited.
Jon Spivey said:
Hi Mark,
That script is just going to spit out the date, you can add whatever tags
you like around it to format it. For example
<span style="font-size: 10px;">
...put your script here
</span>

Will make the text 10px - you can also change fonts' colours etc

Jon

Mark M S said:
I am not a programmer so any direction is appreciated. I found some code
to post the current date on my Web page I will add it at the end here.

I pasted it into a table. I would prefer to adjust the size of the font
smaller and I haven't a clue how. This is pasted into the body and am
using Frontpage 2003

<CENTER>
<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
var days = new Array(8);
days[1] = "Sunday";
days[2] = "Monday";
days[3] = "Tuesday";
days[4] = "Wednesday";
days[5] = "Thursday";
days[6] = "Friday";
days[7] = "Saturday";
var months = new Array(13);
months[1] = "January";
months[2] = "February";
months[3] = "March";
months[4] = "April";
months[5] = "May";
months[6] = "June";
months[7] = "July";
months[8] = "August";
months[9] = "September";
months[10] = "October";
months[11] = "November";
months[12] = "December";
var dateObj = new Date(document.lastModified)
var wday = days[dateObj.getDay() + 1]
var lmonth = months[dateObj.getMonth() + 1]
var date = dateObj.getDate()
var fyear = dateObj.getYear()
if (fyear < 2000)
fyear = fyear + 1900
document.write(wday + ", " + lmonth + " " + date + ", " + fyear)
// End -->
</SCRIPT>
</CENTER>
*************************************************
Mark M Simonian MD FAAP
Medical Director, ChildNet Medical Assoc.
681 Medical Center Drive West #106
Clovis, CA 93611
(559) 325-6850
(e-mail address removed)
www.markmsimonian.medem.com
www.msimonianmd.com
****************************************
Alert: This email and any files transmitted with it
are intended solely for the use of the individual or
entity to whom they are addressed and may contain
confidential, patient health or other legally
privileged information. If you have received this
email in error please notify the sender by email,
delete and destroy this message and its attachments.
Any unauthorized review, use, disclosure,
or distribution is prohibited.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top