Hi Steve, Bob, Murray
All the script does is calculate the date into the variable today. The last
statement is
document.write(today)
Here it is in full. (I don't understand it all as yet, but that doesn't
matter.)
<script language="JavaScript">
<!--
var now = new Date();
var days = new Array(
'Sunday','Monday','Tuesday','Wednesday',
'Thursday','Friday','Saturday');
var months = new Array(
'January','February','March','April','May',
'June','July','August','September','October',
'November','December');
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
function fourdigits(number) {
return (number < 1000) ? number + 1900 : number;}
today = days[now.getDay()] + ", " +
months[now.getMonth()] + " " +
date + ", " +
(fourdigits(now.getYear()));
document.write(today);
//-->
</script>
Murray,
I used your suggestion
I named the function TodaysDate(), changed the last line to return (today)
and placed it in the <head> section
In the body I did exactly as you said, i.e.
<p>Today's date is
<script type="text/javascript">document.write(TodaysDate())</script>
, and you'd better believe it!</p>
It returned:
Today's date is Saturday, January 22, 2005 , and you'd better believe it!
as hoped for
Steve and Bob,
I don't understand your suggestions as yet.
The script is not using document.all.tagid.innerHTML
With a bit of experimentation, it may become clear
--
Thanks to all,
Trevor L.
I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html