• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Trying To Get File Date

 
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm reading in a bunch of file descriptions with the pathname set up dynamically for the anchor tag. I want to create a column showing "Last Updated" for the files that are read in. How do I do that? All I can find is stuff related to reading in the lastmodified of the document, meaning the HTML document that is being processed at the time. I want to read the file lastmodified date from the file in the pathname in the anchor tag. Ex:

<a href="reports/reference/file.doc">Reference File</a>   Last Updated on May 22, 2006.
...next file
...next file

I have the full path, but I only load the relative path to the file. All I've been able to find is this:



Any help will be appreciated. Thanks.

Pat
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You would have to use server side code since last modified only going to work with the current page and only if the server is set up correclty.

Eric
 
Pat Flickner
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, Eric, I just found some code (surprisingly) that seems to work ([URL=from http://www.getelementbyid.com/demo/LastModified/]from http://www.getelementbyid.com/demo/LastModified/[/url]):



Then somewhere in the body, here's the elements:


Granted, this only works well for IE, but in my workplace, that's all that's allowed. Thanks very much anyway. You're the first person to respond to any of my postings in a week!

The "o n l o a d" is actually one word, but it won't let me post as a single word.
 
Pat Flickner
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wow. don't know why the code looks so small. And the URL surround didn't work right, so here's the uri:

www.getelementbyid.com/demo/LastModified/
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic