S
simon_desarte
Hi There,
I am hoping somebody can point me in the right direction - I have
created an ASP page which creates a list of all documents in a given
folder (testfolder in the root). (Code is pasted below)
What I would like to do is create a form checkbox after each file link,
how would I create this so that a new unique checkbox is created for
each individual file.
Could anybody give me any pointers please
Many Thanks
Simon
<% FolderList(Server.MapPath("testfolder")) %>
<% sub FolderList(path)
dim fso, fldr, file, item, url
set fso = CreateObject("Scripting.FileSystemObject")
Response.Write(fso.GetFolder(path))
set fldr = fso.GetFolder(path)
for each item in fldr.Files
url = RepURL(item.path)
Response.Write("<li><a href=""" & url & """>" & item.Name _
& "</li>" & vbCrLf)
next
Response.Write("</ul>" & vbCrLf)
Response.Write("</li>" & vbCrLf)
end sub
function RepURL(path)
dim rootPath, url
rootPath = Server.MapPath("/")
url = Right(path, Len(path) - Len(rootPath))
RepURL = Replace(url, "\", "/")
end function
%>
I am hoping somebody can point me in the right direction - I have
created an ASP page which creates a list of all documents in a given
folder (testfolder in the root). (Code is pasted below)
What I would like to do is create a form checkbox after each file link,
how would I create this so that a new unique checkbox is created for
each individual file.
Could anybody give me any pointers please
Many Thanks
Simon
<% FolderList(Server.MapPath("testfolder")) %>
<% sub FolderList(path)
dim fso, fldr, file, item, url
set fso = CreateObject("Scripting.FileSystemObject")
Response.Write(fso.GetFolder(path))
set fldr = fso.GetFolder(path)
for each item in fldr.Files
url = RepURL(item.path)
Response.Write("<li><a href=""" & url & """>" & item.Name _
& "</li>" & vbCrLf)
next
Response.Write("</ul>" & vbCrLf)
Response.Write("</li>" & vbCrLf)
end sub
function RepURL(path)
dim rootPath, url
rootPath = Server.MapPath("/")
url = Right(path, Len(path) - Len(rootPath))
RepURL = Replace(url, "\", "/")
end function
%>