Jump to content

dynamic update/link file


Guest jtoara

Recommended Posts

Guest jtoara

I'm trying to dynamically display the latest file based on the modification date using javascript in one of my .html...Basically i had this html file that links to a text file...there are few text files in the folder..I wanted the link on my html page to be updated/link to the current text file automatically based on the date of the external file.Can anyone give me some hints?Much appreciated .....I assume it's somewhere along those line but got stuck:<script language="JavaScript">// <!-- date = new Date(); minute = date.getMinutes();// --></SCRIPT></HEAD><BODY><script language="JavaScript">//<!-- if (minute > 2) {document.write('<!--')}//--></script></body></html>

Link to comment
Share on other sites

I'm fairly certain you need a server-side language to get file information. The only file information support javascript has to my knowledge is loading xml and xhtml files into javascript Document objects.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...