• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

JavaScript Question...

jwells777

Senior member
Does anyone know how to display the last modified date of a file in an html file? (i.e. on my index.html page I would like to display when a document MYDOC.pdf was last modified). I have no server side coding techniques available so I think this only leaves Javascript as a possiblility. I wouldn't have thought this difficult but I can't find it on the web anywhere.

Thanks,

Jason
 
This should do it:

document.write("This page updated on " + document.lastModified)

--edit--
bit shorter version

--edit2--
oops... misread your question, displaying the last modified dat of another file is not possible with javascript..
 
If it is not possible in Javascript, what are other options that could be used? I am pretty sure asp or php could do these things, but I think that they are all shut off on our university's public server(i.e. no server side scripts at all).

Thanks
 
You could try it with SSI (server side includes), although that's probably disabled too.
With SSI you insert the following in your html page:

<!--#flastmod file="somefile.ext" -->

You probably also need to change the extension of your html page to .shtml.
 
Back
Top