PDA

View Full Version : Resolved tring to make a small java work.



robin9000
03-09-2009, 05:43 PM
Ok here is the page www.robinsden.110mb.com/testpage.php

What I am trying to do is to get the samll bit of Javascript at the bottom of this to display when the page is loaded.

I have highlighted the code in blue for you. Thanks.

Just in case your wondering I have java script that dose this very well but for reasons of having a search engine being able to pick it up I have had to resort to this. The bit that I have in java script though dose not matter if the Search engine is able to pick it up so that's why I am using Java script here. I want to use java script there because I want the date to change for the copy right automatically each year.

<center><p><a href="http://www.robinsden.110mb.com/links.html" title="Ask to link to us.">Link Exchange</a>
<a href="http://www.robinsden.110mb.com/privacy.html">Privacy Policy</a>
<a href="http://www.robinsden.110mb.com/termsofuse.html">Terms of use</a>
<a href="http://www.robinsden.110mb.com/disclaimer.html">Disclaimer</a>
<a href="http://validator.w3.org/check/referer" title="Xhtml complient" target="_blank">XHTML</a>
<a href="http://jigsaw.w3.org/css-validator/check/referer" title="CSS complient" target="_blank">CSS</a></p></center>
<script type="text/javascript">var d=new Date();
theMonth=d.getYear();
switch (theYear)
{
case 0:
document.write("cnote, Robin\'s Den - ");</script>

jscheuer1
03-09-2009, 06:30 PM
I forget what the exact text of that was that we were working on before, but if all you are doing now is getting the year, all the rest may be hard coded, ex:


Copyright &copy;<script type="text/javascript">document.write(new Date().getFullYear());</script>, Robin's Den -