Hi I was wondering if someone could help me with a code for my website? Basically what I want to do is have a drop down list that is essentially a matrix in the sense that picking one option leads to another and eventually you can narrow down the results and find what you're looking for.

for example if i was searching for cars:

what type of car: honda, ford, etc
what colour: red, blue, green etc
what year: 1999,2000 etc
price: under 5000, etc

and eventually these choices would lead to different results based on what the users input was. If I am posting in the wrong section I am sorry as I am new here and this seemed a good fit...thanks I appreciate any help I can get as I am a novice who has a website!

also if this is not an HTML menu I am looking for please let me know!

Recommended Answers

All 3 Replies

If all options you are talking about are independent (use them as criteria of search), you should produce and display the result on the server side; otherwise, use JavaScript to narrow the selection down before you let the server side display the result. I still believe that your selections would be quite independent and would be used as criteria in database search...

ok yeah I believe they will all be independent too, do you know where I could get the code to make this work?

Do you have a server to do the work for you? Or where do you save all possible results from user selection? If you have a server with database to handle it, you could simply handle this by passing all value via 'form' tag to the server. Then use server side script/code to compose a database SQL call. After that, you use the result from the call in result display. If you want to do this on client side only, you need to place all results on the page you are showing but hide them from display. Then you could select each of them while user is picking selection. Your information is too vague.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.