Automatic link update? (Full Version)

All Forums >> [Web Development] >> General Web Development



Message


yuri.nater -> Automatic link update? (9/19/2006 15:01:14)

I hope I explain this correctly. I'm really a rookie trying to do something over my head. So here goes:

I have a website for server monitoring. Every day a new .htm report is created. I use the same name because that was the easy part. It lists any problems with servers. For historical purposes, I rename the file to <Name.DD.MM.YY>.htm.

I've made a calendar where I link to my past data. Is there a way I can automatically add a hyperlink to my calendar if <Name.DD.MM.YY>.htm exists? Is there some sort of batch file or VBS that will do it for me?

Also, if one of the servers has a problem, I'd like the link to be red. If there's no problem, I want it to be green. How can I do that (or can it be done)?





genusus -> RE: Automatic link update? (10/19/2006 1:18:58)

You can use the FileSystemObject to check and see if a file exists.

Since you know the names of the files and you know where you're storing them, if you re-do you calendar / status page as ASP (if it's not already) then you can write a bit of code to iterate through the days of the month, from the 1st to the current day, and generate links where those files exist and link-less text where they don't.

As for putting the links in red, that would depend...you'd need to parse the files and look for some bit of identifying text in order to determine that automatically. If the text from the files was also stored in a SQL Server database, you could do a Full Text Search on the data instead of parsing the .htm files.

Lou




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
6.201172E-02