Menu
Hi,
I’d like to add automatically a date & time stamp to a webpage below links to files (.pdf, .xls, .html) on the local file server. The date & time should represent the file-save date & time.
Sample.xls
Updated Sep.24 2004 6:49 PM
Thank you for your help.
Stefan
p.s
Is it somehow possible to detect in which time zone …6:49… the save took place?¿
var lastAccess = "";
function getLink(isLink,linkName){
updateInfo(isLink)
document.getElementById(linkName).innerText = lastAccess;
window.open(isLink);
}
isPath = "C:SomeFolderSomeOtherFolder"
function updateInfo(fileSpec)
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set contentFile = fso.GetFile(Server.MapPath(isPath+fileSpec))
strInfo = "Last Accessed: "
strInfo = strInfo & contentFile.DateLastAccessed
strInfo = strInfo & " Last Modified: "
strInfo = strInfo & contentFile.DateLastModified
lastAccess = strInfo
Set contentFile = Nothing
Set fso = Nothing
End Function
var lastAccess = "";
function getLink(isLink,linkName){
updateInfo(isLink)
document.getElementById(linkName).innerText = lastAccess;
window.open(isLink);
}
isPath = "C:WindowsDesktopProjectTesting"
Function updateInfo(fileSpec)
Set fso = CreateObject("Scripting.FileSystemObject")
Set contentFile = fso.GetFile(isPath+fileSpec)
strInfo = "Last Accessed: "
strInfo = strInfo & contentFile.DateLastAccessed
strInfo = strInfo & " Last Modified: "
strInfo = strInfo & contentFile.DateLastModified
lastAccess = strInfo
Set contentFile = Nothing
Set fso = Nothing
End Function
Font-Size : 9pt;
Font-Style : Italic;
Color : Blue;
}
var lastAccess = "";
function getTimeStamps(){
nLinks = document.links.length;
for (i=0; i<nLinks; i++)
{
tmp = document.links[i].toString();
tmp = tmp.split("'");
thisLink = tmp[1];
linkName = tmp[3];
updateInfo(thisLink);
document.getElementById(linkName).innerText = lastAccess;
}
}
function getLink(isLink,linkName){
updateInfo(isLink)
document.getElementById(linkName).innerText = lastAccess;
window.open(isLink);
}
window.onload=getTimeStamps;
isPath = "C:WindowsDesktopProject"
Function updateInfo(fileSpec)
Set fso = CreateObject("Scripting.FileSystemObject")
Set contentFile = fso.GetFile(isPath+fileSpec)
strInfo = "Last Accessed: "
strInfo = strInfo & contentFile.DateLastAccessed
strInfo = strInfo & " -- Last Modified: "
strInfo = strInfo & contentFile.DateLastModified
lastAccess = strInfo
Set contentFile = Nothing
Set fso = Nothing
End Function
0.1.9 — BETA 5.18