Announcement

Collapse
No announcement yet.

Date Stamp For Upload

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Date Stamp For Upload

    Hi

    I want to add a "last updated" line to my product pages, I found a solution in the knowledgebase (http://community.actinic.com/showthread.php?t=45431) and it has the following javascript to paste into the layout:


    <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
    <!-Begin
    var dateObj = new Date(document.lastModified)
    document.write("Last Updated: " + dateObj.toLocaleString());
    // End -->
    </SCRIPT>

    However when I insert it I get the error "opening and closing signs are not matching" and also a general syntax error. I dont have a clue on javascript and have tried playing but without success. Can anyone spot an obvious error so I can tweak it, as it appears there is an error with this script?

    Thanks in advance

    Scottydog
    Last edited by KB2; 22-Mar-2010, 10:36 AM. Reason: Updating kb links
    www.edgeandwax.co.uk
    Edge & Wax
    Ski & Snowboard Workshop

    #2
    Try changing this:
    <!-Begin
    to this:
    <!-- Begin

    Comment


      #3
      Doh! Knew it would be something simple, many thanks!

      ScottyDog
      www.edgeandwax.co.uk
      Edge & Wax
      Ski & Snowboard Workshop

      Comment


        #4
        Scott
        can you say when this date stamp is updated?
        E.g. when a given product is accessed, or when it is actually modified.
        Or is it updated whenever the website is refreshed/updated, whether the product has been modified or not?
        Kind Regards
        Sean Williams

        Calamander Ltd

        Comment


          #5
          Originally posted by Sean Williams View Post
          Scott
          can you say when this date stamp is updated?
          E.g. when a given product is accessed, or when it is actually modified.
          Or is it updated whenever the website is refreshed/updated, whether the product has been modified or not?
          The code displays the date that the HTML page it's on was last modified (or more accurately the date Actinic uploaded it after modification).

          If using single product pages, such pages only get uploaded when something on them changes which would most likely be product details.

          If used on a multi product page, the upload would take place when any of the products on it were amended.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Thanks Norman - appreciated
            Kind Regards
            Sean Williams

            Calamander Ltd

            Comment

            Working...
            X