views:

193

answers:

2

I need to find some way of displaying a drop-down menu that depending on what is chosen will display a second tier of results in another drop-down. All data will be stored in database. Any other similar techniques are welcome. I am currently using mootools, with php and Mysql.

Any help or thoughts welcome on this one...

+1  A: 

Basic outline of what you need to do:

Attach an onChange event to your <select> control

In the event handler, make a request to a php file (using mootools Request object). Pass the selected value from the form control.

In the php file, grab the form value out of $_POST and do whatever query you need to get the result set.

If you used Request.HTML, you can build a string that will be inserted into an element when the request finishes. I haven't had much luck using this to build out <select> controls. I'd probably use Request.JSON, and use the onSuccess property of your Request.JSON object to build out the new select control.

Johrn
A: 

If anyone is ready this wondering the same, I did find this: Chained Select Which has done the job for me...

jimbo