I've reviewed the article by Julian Hansen detailing how to create linked dropdowns using JQuery and PHP. However, how would I go about this if I have the data stored in different folders located on a server?
Ex. Main Folder > Sub Folder > 3rd folder > Document
1st Dropdown list will provide a list of states (list extracted from Main Folder)
2nd Dropdown list will provide a list of cities (list extracted from Subfolder, dependent on 1st dropdown selection)
3rd Dropdown list will provide a list of counties (list extracted from 3rd folder, dependent on 2nd dropdown selection)
4th dropdown list will provide a list of word/excel/pdf documents (list extracted from document, list is dependent on 3rd dropdown selection)
The form should display as a popup form, with submit and clear buttons.
Thank you for your response. Do I have to list every document under the root, rather than fetching the data from the folders to display?
Julian Hansen
Not sure I understand the question? The solution works on a hierarchical folder structure.
To display files in the last drop down you would test for all parameters not false (root and sub1 in the PHP file) - if that is the case then ask for files instead of folders.
Thank you! Is this possible to fetch the data locally rather than fetching from the file server? If so can you provide a sample for that? Lastly, how do I open the document (word, excel, pdf, etc.) when the user clicks a button?
HTML
Open in new window
jQueryOpen in new window
PHPOpen in new window
Working sample here