Click to See Complete Forum and Search --> : java script problem


don
05-25-2003, 01:18 AM
Hello
I use this copright update script on a number of pages

<script type="text/javascript">
//ATOJ (c) 2002 www.atouchofjamaica.com
//use script freely "freeware script"
//keep copyright information in script

copyright=new Date();
update=copyright.getYear();

//---write copyright
document.write("Copyright © 2000-"+ update + "&nbsp;&nbsp; JBonline&nbsp;Jervis Bay Online &nbsp;JB Online &nbsp;- www.jervis-bay-nsw.com.au &nbsp;&nbsp;All rights Reserved.");

</script>
But for some reason will not work on this page
http://www.jervis-bay-nsw.com.au/

Have tryed re pasting but just will not work

Would some one mind looking at source to see what I have stuffed up
Regards
Don

don
05-25-2003, 04:09 AM
that was the problem thanks Dave
I removed the meta tag
<meta name="copyright" content="Jervis Bay Online">

and works fine now

your help was most appreciated
regards
Don

Charles
05-25-2003, 04:30 AM
I don't know what browsers you have tested that on, but it should give you a date stamp that is off by 1900 years. (http://devedge.netscape.com/library/manuals/2000/javascript/1.5/reference/date.html#1194138) And you don't need a variable at all.

<script type="text/javascript">
<!--
document.write('Copyright © 2000-', new Date().getFullYear(), ' JBonline Jervis Bay Online JB Online - www.jervis-bay-nsw.com.au All rights Reserved.');
// -->
</script>

don
05-25-2003, 05:00 AM
Hi Charles
have only tested on ie 6

have added your script to http://www.jervis-bay-nsw.com.au/

as NO 2 as I dont have netscape on my computer will check on a mates computer tommorrw and see if both scripts are working

regards
Don