ze********@yahoo.com.au (Dave) wrote in
news:6e**************************@posting.google.c om:
Hi,
Can anyone tell me a simple way of inserting some sort of code into a
Dreamweaver template (it goes at the bottom of the page in Copyright
info) that will cause the current year to be automatically inserted at
spot X when the pages are viewed that were produced from the template
or are linked to it?
Thanks
Dave
In the HTML portion of the page write:
Copyright © <SCRIPT>
<!--
var year=new Date();
year=year.getYear();
if (year<1900) year+=1900;
document.write(year);
//-->
</SCRIPT> Your Name, All Rights Reserved.
This will get the date, grab the year from the date, check to make sure it
is in 4-digit format (just in case) and insert it after a copyright "C" in
a circle and before your name. If put in as it is here, it should look
like this:
Copyright © 2004 Your Name, All Rights Reserved
Good luck, LJL