close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

3 level dynamic dropdown list

Thread began 12/18/2012 11:09 pm by Christopher West | Last modified 12/19/2012 12:48 pm by Jason Byrnes | 460 views | 1 replies |

Christopher WestCommunity Expert

3 level dynamic dropdown list

Hi there, Im creating a seach page that will involve a user to select from a dropdown:
Hotels by Country
Hotels by City
Hotel names

All of the above are dynamic and currently I am using 1 database table to store the country, city, hotel name. (as well as details for the hotel).

I am a bit confused with the dynamic array help file and just would like a little more clarification for the approach above.

So hotels are filtered from hotels by city. and hotels by city are filtered from hotels by country.

is this possible using 1 table in my database?

Sign in to reply to this post

Jason ByrnesWebAssist

it's possible but the concept is a little convoluted. basically, you need to create relations on the fly by using CONCAT in your recordset.

you need 3 recordsets:

rsCountries
SELECT country from tableNmae

rsCountryCities:
SELECT country, city, CONCAT(country,'',city) AS countryCity FROM tableName

rsHotels
SELECT hotel, CONCAT(country,'',city) AS countryCity FROM tableName

for the first select list, use the rsCountries recordset, use the country column as the label and the value.

add the First Dynamic array behavior using the rsCountryCities recordset. the parent ID will be the country column, child ID is the countryCity and child value is the city

in the second dynamic array, use the rsHotels recordset, the parent is is the countryCity column, the child id and value use the hotels column

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...