[WEB4LIB] javascript not working once server side includes were turned on

John Hubbard jhubbard at haverford.edu
Mon Jun 11 12:20:02 EDT 2001


"Last revised 06/11/2001" shows on IE. ;)

The script is noticing that your Web server checked for SSI before sending
out the page, so the use of document.lastmodified is fouled up. So it's time
to can the js date hack and switch to <!--#echo var="LAST_MODIFIED"--> (or
else risk another obligatory post from Thomas or Roy about the detriments of
client-side technology).

Some SSI tutorials and command reference are at
<http://wdvl.com/Authoring/SSI/>.

- John



-----Original Message-----
From: web4lib at webjunction.org
[mailto:web4lib at webjunction.org]On Behalf Of Linda Woods Hyman
Sent: Monday, June 11, 2001 11:41 AM
To: Multiple recipients of list
Subject: [WEB4LIB] javascript not working once server side includes were
turned on


Hi gals/guys. I need your sage advice once again. Recently our system
administrator broke down and fully implemented server side includes. We can
now use ssi's without having to change the extension to .shtml or having to
stash it in a special directory.  Hurray! That only took 2 + years.

Now I am having a problem with a pre-existing javascript that we were using
to create the "file last modified" date. (The other javascript on our site
appears to be working just fine) I know there is a way to use the "echo" as
well as some other statements to generate a last modified statement and
date.  Can anyone help? Here is the old javascript code just for giggles.
For an example see http://www.kn.pacbell.com/wired/webtime/ which is
reflecting a date of December 31, 1969. Thanks.

<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Kenneth Preston <drkennan at ionet.net> -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
<!-- Script Size:  0.65 KB  -->
var m = "Last revised " + document.lastModified;
var p = m.length-8;
document.writeln(" ");
document.write(m.substring(p, 0));
document.writeln(" ");
// End -->
</SCRIPT>
****************************
Linda Woods Hyman, MLS., MA.
Pacific Bell Education First
(619) 237-2020
http://www.kn.pacbell.com
lwhyman at pacbell.net



More information about the Web4lib mailing list