Announcement

Collapse
No announcement yet.

Need Java Script help

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

  • Need Java Script help

    I need a script for my website to write the day a file was last updated. There are a ton of simple scripts on google but I have a problem.

    Where I want it to say "Last updated ##/##/##" is a different page then the one I want updated.

    Basically I want to put a "last updated..." on my homepage that refers to my blog which is a diffent page. Any ideas? I really don't want to update the homepage by hand.
    ,./(0)3

    '04 Canyon 4x4 pickup

    [---PC on hold----working on external fiberglass "tool" box---]

  • #2
    What webserver are you running?
    Basically you can just use SSI = Server Side Include
    Appache usually have this enable by default.
    MS IIS usually have this disable. I just forgot how to set that up, but if you search MS site for SSI, it will give you instruction on how to setup SSI.

    More info can be found here or your friendly search engine
    http://tech.irt.org/articles/js166/#ssi_flastmod

    [edit]
    Well, if SSI is not an option maybe this (from NS JS Reference 1.3)
    Code:
    lastmod = document.lastModified // get string of last modified date
    lastmoddate = Date.parse(lastmod)// convert modified string to date
    if(lastmoddate == 0){// unknown date (or January 1, 1970 GMT)
    document.writeln("Lastmodified: Unknown")
    } else {
    document.writeln("LastModified: " + lastmod)
    }
    2004 Matrix XR A7N8X-VM/400 AMD XP-M 2500+, DS-ATX
    89 Supra Turbo P3 [email protected]/Abit BE6 II, Alpine M-BUS Car2PC.
    Y2K Accord Dell GX150
    RoadRunner is the best FE PERIOD
    EmoRebellion is a SCAMMER

    Comment


    • #3
      Bot how do I reference a different file than the one I'm writting to?
      ,./(0)3

      '04 Canyon 4x4 pickup

      [---PC on hold----working on external fiberglass "tool" box---]

      Comment

      Working...
      X