Here's the modi.js file used to display the web date modified on each page
It's called in each web page as in ...
<TITLE>pigsoft(c)2000</TITLE>
<script language="JavaScript" src="../modi.js"></script>
</HEAD>
Here is the contents of the modi.js text file ...
--[ start of file ]
var n_Date = new Date( document.lastModified );
var dayName = new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
var LongdayName = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
function table_date()
{
document.write("<table border='3' cellspacing='1' width='100%' height='0'>");
document.write("<tr>");
document.write("<td width='90%' valign='middle' align='center'>");
document.write("Last page update was ");
do_date(); ( NOTE: HERE IT CALLS A FUNCTION WITHIN A FUNCTION )
document.write("</td>");
document.write("</tr>");
document.write("</table>");
}
function do_date()
{
document.write(" ");
document.write( n_Date.getDate() );
document.write("/");
document.write((n_Date.getMonth()+1) );
document.write("/");
document.write( n_Date.getFullYear() );
}
function short_date( string )
{
if( !string ) document.write("Last page update was ");
document.write(dayName[ n_Date.getDay() ]);
do_date();
}
function long_date( string )
{
if( !string ) document.write("Last page update was ");
document.write(LongdayName[ n_Date.getDay() ]);
do_date();
}
function tempstuff()
{
document.write(LongdayName[ n_Date.getDay() ])
document.write(" ");
document.write(n_Date.getDate());
document.write("/");
document.write((n_Date.getMonth()+1));
document.write("/");
document.write(n_Date.getFullYear());
}
--[ end of file (modi.js) ]
It's called when needed like so ...
<script language="JavaScript;>
long_date();
</script>
Long Date out put is like this
OR
<script language="JavaScript;>
short_date();
</script>
Short Date out put is like this
OR
<script language="JavaScript;>
table_date();
</script>
Table Date out put is like this
The "no" option (could be anything) turns off the line "Last page update was "
<script language="JavaScript;>
long_date("no");
</script>
long date out put with 'no' as a condition is like this
This might be of help you - there's lots you can do with this