homepage Welcome to WebmasterWorld Guest from 54.237.98.229
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Refering to properties of other files
Using JavaScript to create a dynamic "Welcome" page.
NetGrease

10+ Year Member



 
Msg#: 659 posted 8:48 am on Aug 23, 2001 (gmt 0)

I'd like to implement an automated "since you last visited" updates page, which covers multiple pages. What I'd like to do is read the lastModified property from all the main section pages on my site, then display links to any that have changed in a simple table.

This link display won't be a problem, but I'm very keen to get the lastModified property from all main pages working, if possible. I'm sure it is, but can't get it to work at the moment. Does anyone know how?

 

joshie76

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 659 posted 8:54 am on Aug 23, 2001 (gmt 0)

Doing it on the server, using ASP say, is pretty easy.

Create an instance of the FileSystemObject, point it at your files and use the DateLastModified property:

More details on using the FileSystemObject are onBrainJar [brainjar.com].

obviously you'll need to drop a cookie that tells the server when the user last visited.

NetGrease

10+ Year Member



 
Msg#: 659 posted 12:18 pm on Aug 23, 2001 (gmt 0)

Thanks joshie76, but I've got to try and get it working in JavaScript if I can, unfortunately.
:(
Any other ideas?

joshie76

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 659 posted 3:31 pm on Aug 23, 2001 (gmt 0)

You can indeed access the last modified date of a document in JS

var lmdate = new Date(document.lastModified)

However, you will only be able to do this, as far as I can see, when a document is on the client. Perhaps you could invent some script that will go off and call a load of files for download into a hidden frame or something but I don't think people would like you for it.

How often do you change your site, perhaps a manual system would be the easiest and best as you could tell users exactly WHAT has been added/updated?

Sorry I can't be of more help :( - perhaps somebody else has some good ideas?

josh

NetGrease

10+ Year Member



 
Msg#: 659 posted 11:21 am on Aug 24, 2001 (gmt 0)

Thanks again joshie76.

Updates are done twice weekly, and although I have a script in place that presents the visitor with an "Updates since you were last here" page, you have to edit the "last updated" date for each section manually. This is what I'm trying to avoid having to do every time I add a new piece of news or an article etc. Automation via JS would be the ideal solution, but I'm not having any success still when trying to reference to lastModified properties of other files.

The client-side processing is obvious too, now that I actually stop for a moment and think about it. :) Downloading all the pages at once, hidden or otherwise, wouldn't be great for visitor satisfaction, so I may have to either stick with the manual updates or bin the idea altogether.

I'm not great at ASP (yet ;)) but as I learn more I might migrate to another host which would support this functionality.

Back to the drawing board then, unless anyone else has any suggestions?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved