Link to home
Start Free TrialLog in
Avatar of code_seekor
code_seekor

asked on

Javascript or php to search directory and display file links on page

Hi,

I have a map that displays different airports, on clicking one of the airports (HTML pages) e.g ORD the user will be directed to a page with 5 tabs where each tab should display links to documents from a folder based on the airport they selected. Each tab displays certain documents related to the ORD. Essentially I would need to display links based on what tab is selected from a directory that can have subfolders specific to each airport and each tab.

<folder>ORD
       <sub-folder>Airport information (tab)
         info.pdf
         info2.pdf
       <sub-folder>Airport Development (tab 2)
         dev.pdf
         dev2.pdf
         dev3.pdf
         dev4.pdf

And so on...

I need to do this dynamically so that I don’t have to create or remove a link each time a new document is added or removed to a folder.

I am completely new at setting up anything like this. A specific explanation of what pages or scripts needed to be created and where scripts should be placed would be extremely helpful.

Any help or suggestions on doing this would be highly appreciated!
Thanks
ASKER CERTIFIED SOLUTION
Avatar of EMB01
EMB01
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of code_seekor
code_seekor

ASKER

Thank you so much! I haven't had a chance to implement this yet but will do so and let you guys know how it worked!

Thanks again!
How does my reports page which has the tabs under which these files will be displayed and link, know to read from the php file that we created? Thanks!
You can put the script inside of your reports page.
There may be a long learning curve to get from where you are to where you want to go.  I recommend this book as one essential part of the "getting started" process.
http://www.sitepoint.com/books/phpmysql5/

Best of luck with your project! ~Ray
Thank you!!