We have some asp pages on our intranet which display lists of files within a folder, with a hyperlink for users to be able to open the file.
Some of our PC's have recently been upgraded to IE9 and now the files are no longer listed.
See code below that is being used.
Just for information the latest Mozilla Firefox displays the files with no problems and Google Chrome displays the code (!)
Any help with this would be appreciated.
Jay
Some of our PC's have recently been upgraded to IE9 and now the files are no longer listed.
See code below that is being used.
Code:
<% ListFolderContents (Server.MapPath("Files")) %>
Code:
<% sub ListFolderContents(path)
dim fs, folder, file, item, url
set fs=CreateObject("Scripting.FileSystemObject")
set folder=fs.GetFolder(path)
Response.Write (vbCrLf)
for each item in folder.Files
url=MapURL(item.Path)
Response.Write("<a target=""_blank""href="""& url &""">"_
& mid(item.Name,3, (len(item.name)-6)) &"</a>"&vbCrLf&"<br>")
next
Response.Write(vbCrLf)
end sub%>
<% function MapURL(path)
dim rootPath, url
rootPath = Server.MapPath("/")
url = Right(path, Len(path) - Len(rootPath))
MapURL = Replace(url, "\", "/")
end function %>
</p>
Just for information the latest Mozilla Firefox displays the files with no problems and Google Chrome displays the code (!)
Any help with this would be appreciated.
Jay