main
side
curve
  1. In Memory of LAJ_FETT: Please share your remembrances and condolences HERE

This page was last updated...

Discussion in 'Archive: Fan Sites' started by Ki-Bara-Mundi, Oct 26, 2003.

Thread Status:
Not open for further replies.
  1. Ki-Bara-Mundi

    Ki-Bara-Mundi Jedi Master star 6

    Registered:
    Nov 27, 2000
    I need a little help with some javascripting.

    I've found a whole bunch of sites that have source code for a javascript timestamp (i.e that "This page was last update on [insert date here]" thing). My problem/challenge is finding one that displays the timestamp for one page on a different page.

    Would anyone be able to help me out here?
     
  2. AERYN_SUN

    AERYN_SUN Jedi Knight star 5

    Registered:
    Apr 1, 2001
    I found a script awhile back while working a website for school on JS Made Easy.com

    <body>
    <SCRIPT LANGUAGE="JavaScript">

    <!-- Original: Kenneth Preston <drkennan@ionet.net> -->



    <!-- Begin
    var m = "Page updated " + document.lastModified;
    var p = m.length-8;
    document.writeln("<center>");
    document.write(m.substring(p, 0));
    document.writeln("</center>");
    // End -->
    </SCRIPT>
    </body>

    or

    <body>
    <CENTER>
    <SCRIPT LANGUAGE="JavaScript">



    <!-- Begin
    Stamp = new Date();
    document.write('<font size="2" face="Arial"><B>' + (Stamp.getMonth() + 1) +"/"+Stamp.getDate()+ "/"+Stamp.getYear() + '</B></font><BR>');
    var Hours;
    var Mins;
    var Time;
    Hours = Stamp.getHours();
    if (Hours >= 12) {
    Time = " P.M.";
    }
    else {
    Time = " A.M.";
    }
    if (Hours > 12) {
    Hours -= 12;
    }
    if (Hours == 0) {
    Hours = 12;
    }
    Mins = Stamp.getMinutes();
    if (Mins < 10) {
    Mins = "0" + Mins;
    }
    document.write('<font size="2" face="Arial"><B>' + Hours + ":" + Mins + Time + '</B></font>');
    // End -->
    </SCRIPT>
    </CENTER>
    </body>
     
Thread Status:
Not open for further replies.