File Display in a Folder (Full Version)

All Forums >> [Web Development] >> General Web Development



Message


steveg -> File Display in a Folder (3/18/2005 7:53:28)

I would like to display the files in a folder but don't know how or if it is possible with FrontPage.

I have a number of clients and they have a series of reports. I would like to let them look at the folder for monthly reports and to be able to see the file names and just select to download. Otherwise I have to build a menu that needs changing when we upload new files. The files already have month and year info in their title so they would be easy for the customer to recognise.

Is this possible?

Thanks

Steve




jaybee -> RE: File Display in a Folder (3/18/2005 9:43:15)

There are a lot of scripts for download managers. This link takes you to page one of a pile of them. This is the PHP list but if you don't have PHP on your host, you'll need to look in the ASP section.





steveg -> RE: File Display in a Folder (3/23/2005 9:00:40)

Maybe I'm reading them wrong but they all seem to have a lot more in them than I need. I just want a person to see their folder, see the listed files and download them. I have .asp and only looked at the .asp ones, but they appear to be complete folder management utilities.

Am I just not understanding?

Steve




CelticDragon -> RE: File Display in a Folder (3/23/2005 10:43:09)

This wouldn't be as simple and basic as just not having an index file in the folder would it?

If you don't have an index and link to just the folder then it just lists everything in the folder.

It doesn't look pretty but it could be a fix




rdouglass -> RE: File Display in a Folder (3/23/2005 11:13:21)

I have a sample of the code I use here:

http://www.clarkinsurance.com/directory_browser_code.htm

There is some JavaScript on the page and a reference to a few images that you won't get, but the concept is quite straightforward. I use this page to list documents that primarily are scanned into Adobe Acrobat. However some Word files and Excel SS's are put there as well.

Put all this code onto an ASP page and save it to any directory. Browse to the page and it will list all files with the extensions listed in this line along with the creation (scan) dates.

<% If (strExt="PDF") or (strExt="DOC") or (strExt="XLS") or (strExt="HTM") then %>

See, with this example I display PDF,DOC,XLS, or HTM files but you can change it to fit your situation. The only problem with this code is that any filename that contains an apostrophe will not open. The file will be listed but the link to it will not function.

Hope it helps.




steveg -> RE: File Display in a Folder (3/23/2005 13:01:49)

Tried the code and it looks pretty good. I have made a number of cosmetic changes and they all work fine. I would like to get the links, when selected, to come up in the same window but can't see it in the code as yet. Also, I would like to change the font of the displayed links, can't quite see where to do that.

Otherwise, it seems to be just what I need!!![:D]




rdouglass -> RE: File Display in a Folder (3/23/2005 13:28:29)

This line here:

<a href="javascript:winopen('<%=strFile%>')">

uses a JavaScript to open a new window. Just changing it to this should work:

<a href="<%=strFile%>">

Hope it helps.

EDIT: In that same area is where I change font sizes and stuff; I also use a style for my links:

<style>
<!--
A:link {text-decoration: none; color: blue}
A:visited {text-decoration: none; color: blue}
A:hover { text-decoration: none; color: #ff0000 }
//-->
</style>




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
6.300354E-02