This script uses dynamic html to display a "new.gif", "revised.gif" or "update.gif" image in front of every defined hyperlink has been changed in the last 60 days.
To install, download the above gif files and the file new.js. Add:
<script LANGUAGE="JavaScript" TYPE="text/javascript" src="new.js"></script>
within the <head> of your web page. You also need to define your file list in public arrays.
Public Variables:
newnam[].typ - file type: 1 = new, 2 = revised, 3 = update
newnam[].nam - file name
newdte[].dte - last updated
You'll need a function to help the process: Example JavaScript code:
newnam = new Array()
function fnnam(typ, nam, dte) {this.typ = typ ; this.nam = nam; this.dte = dte}
newnam[0] = new fnnam(2, "home.htm", new Date(2005, 1-1, 20))
newnam[1] = new fnnam(1, "welcome.htm", new Date(2005, 2-1, 20))
Finally, add <body onload="new_init()">. When executed, "new_init()" will search all hyperlinks for "home.htm" and "welcome.htm". All "home.htm" links will get marked until the end of March 2005, "welcome.htm" links will get marked until the end of April 2005.
Note: For people using FoxPro, I created newfile.prg. This procedure will generate an external JavaScript file called newfile.js. newfile.js contains a newnam[] for every file in the specified directory.
[Return to Top]
[Go to Home Page]
Copyright © 2013 Dennis Allen.
This web page was last updated 11/18/15