Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

Dynamic Displayer of folders

Question posted by: bkendra5 (Newbie) on May 7th, 2008 05:03 PM
I have a folder called "Policies" this folder contains several subfolders, inside the subfolders are the policies in PDF format. I am trying to build a single "Policies" page to display all the folders then you can click on the folder and it will then again write all the policies in that folder.
Thanks in advance! I've been working on this for about 2 months now!
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
jeffstl's Avatar
jeffstl
Expert
328 Posts
May 7th, 2008
08:20 PM
#2

Re: Dynamic Displayer of folders
Quote:
Originally Posted by bkendra5
I have a folder called "Policies" this folder contains several subfolders, inside the subfolders are the policies in PDF format. I am trying to build a single "Policies" page to display all the folders then you can click on the folder and it will then again write all the policies in that folder.
Thanks in advance! I've been working on this for about 2 months now!


Are you using Classic ASP or ASP.NET?

Here is how to use the file system object in classic ASP

Code: ( text )
  1. set MyFSO = server.createobject("Scripting.FileSystemObject")
  2. MyFolder = Request.ServerVariables("APPL_PHYSICAL_PATH") & "..\wwwroot\NameOfFolder"
  3. set MyFiles = MyFSO.GetFolder(MyFolder)
  4. set FileList = MyFiles.Files
  5. 'LOOP THROUGH
  6. for each PolicyFile in FileList
  7.      response.write PolicyFile.name
  8. next


Obviously you can add dynamic <a href> tag around your file name to link to it.

If you are using asp.net please specify as the process is quite different

Reply
DrBunchman's Avatar
DrBunchman
Moderator
556 Posts
May 8th, 2008
08:12 AM
#3

Re: Dynamic Displayer of folders
You can also use an <embed> or <iframe> tag to display your pdf in the browser along with other content.

Dr B

Reply
Reply
Not the answer you were looking for? Post your question . . .
170,098 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Top ASP Forum Contributors