Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Automatic collapsible menu??
Old 03-11-2010, 12:19 PM Automatic collapsible menu??
Junior Talker

Posts: 2
Name: Carol Helmich
Trades: 0
I don't know if this is possible but before I went to a lot of work I thought I would ask, and this may not be the correct forum in which to ask but I had to start somewhere.

On the website I built and am now managing I have a folder called "Documents". Inside that folder are other folders, and inside those folders are actual documents.

I would like to create a page called "Document Center" that the visitor can go to to find a certain document, say an application.

I like the idea of a collapsible menu so the visitor isn't hit with a huge long list of documents to sort thru, however, it seems like it will be a pain to maintain since every time I upload a document, I then have to go and update the menu.

Is there anything out there that I can use that will "automatically" see and list what is in that folder? Similar to Windows Explorer. I don't have to tell my computer each time a file is added, if I go to Explorer and click on the folder it shows me everything in there.

Does this make sense? BTW, I am a newbie at this so take it easy on me please!
chelmich is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-11-2010, 12:34 PM Re: Automatic collapsible menu??
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
To read files on the server, you need a server side code, such as ASP, Coldfusion, PHP, etc. Reading a list of all files in a directory is a trivial task with one of these, with a small amount of programming, but there are no facilities in the browser to manage this task.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 03-11-2010, 05:16 PM Re: Automatic collapsible menu??
Junior Talker

Posts: 2
Name: Carol Helmich
Trades: 0
I know the server supports PHP but I am not fluent in it.
If I was going to do a search to find a tutorial on this, what should I search for? I haven't had any luck so far.
chelmich is offline
Reply With Quote
View Public Profile
 
Old 03-11-2010, 08:22 PM Re: Automatic collapsible menu??
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
In PHP it works like this:
PHP Code:
$dh opendir('/absolute/path/to/');
while ((
$file readdir($dh)) !== false) {
    if(
filetype('/absolute/path/to/' $file) == 'file') {
        echo 
$file;
    }
}
closedir($dh); 
The line:
Quote:
echo $file
simply means output the file name to the browser, without the path info. Of course you could do may other things, such as:
PHP Code:
echo '<a href="/directory/' $file.'">'.$file.'</a>'
Of course, none of this is directly related to a collapsible menu, which is more a JavaScript issue, but since PHP processing happens before any code hits the browser, it is a separate task entirely.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Reply     « Reply to Automatic collapsible menu??
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15119 seconds with 12 queries