Results 1 to 2 of 2

Thread: tring to make a small java work.

  1. #1
    Join Date
    Feb 2009
    Posts
    159
    Thanks
    60
    Thanked 3 Times in 3 Posts

    Default tring to make a small java work.

    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>
    Last edited by robin9000; 03-09-2009 at 07:14 PM.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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:

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

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    robin9000 (03-09-2009)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •