How to make automatical "NEW"-tags on website

Hurricane

Sleeping Dragon
Joined
Dec 6, 2001
Messages
1,197
I have a small (intranet) site which I update on a daily basis. The site contains links to various Excel,Word etc. files. Some of the files are updated daily, some weekly and some on an irregular basis. Now, instead of me having to remember to write "last updated xx.xx" after every link, I wonder if it is possible to have some script do it automatically?

For example a JavaScript code that checks for the file date, and if the file date is new enough the script would insert a "NEW" image beside the link.

Any suggestions? :)
 
Originally posted by Lostman
Check here, or here
or here or here
or here. There's more out there but you get the point. Copy and paste my friend.

Couldn´t get the Yahoo links to works. They just sent me to the start page. Anyway, I couldn´t find anything to solve my particular problem (I copied some other nice scripts, though). I guess JavaScript just can´t handle it. :(
 
You should be more specific about your problem.
On which platform do you run your intranet?
Do you have access to database?
 
The intranet is on a shared computer, so it is not on a web server or anything. No databases, either. Just simple HTML files accessible by everyone inside the company.
 
Huh, this tip is for MS related platforms, although the concept is the same on any platform.
U can access file information with FileSystemObject.

var fso = new ActiveXObject("Scripting.FileSystemObject");

U have info on the object in MSDN.

Now all u have to do is to create your links dynamically using data from fso.

If u can't find any patterns in your document creation then u have a problem.
Good luck.
 
Thanks, I´ll check it out. I haven´t done any ActiveX programming before, but it can´t be that hard, can it? :D

I´ll get back to you after the weekend. :)
 
Back
Top Bottom