PDA

View Full Version : Auto Copyright year script



dak
10-05-2006, 05:30 PM
Hello,

I have found the following javascript for automatically generating for copyright year on a web page:

<script type="text/javascript">
copyright=new Date();
update=copyright.getFullYear();
document.write("Copyright 2001-"+ update + " (your company name) All rights reserved.");
</script>

However, my question is: instead of writing this script on every single webpage, how could I save this script on an external .js page and call it into every webpage?

Many Thanks

blm126
10-05-2006, 07:59 PM
Don't bother. Pages have any immediate copyright unless explicitly stated otherwise. The whole copyright notice on webpages is just to "scare" away potential thiefs and will look perfectly valid without the year

Twey
10-05-2006, 08:05 PM
That script has the delightful side effect of displaying no copyright notice at all to the non-JS user. :)