I've tried finding this in Google, but I don't really know what I'm asking for, so it makes it hard for me to find what I want. I've found lots about dynamically creating dropdowns, but that is not really what I'm trying to accomplish.
Here's what I'm looking to do (this is just a simplified example). Let's say I have a list of 4 colors. I also have 4 dropdown <select> fields. By default, each of these dropdowns is automatically populated with all 4 colors as possible selections. Once one of the colors is selected in the first dropdown, the remaining 3 dropdowns are updated to only allow a selection from the 3 remaining unselected color options. By the time you arrive at the 4th and final dropdown, only one option remains, and is selected automatically.
The number of dropdowns is dynamic, and is based on the number of available colors stored in the MySQL database. The number of dropdowns (for this use) is equal to number of result rows in a query. However, if possible, I would also like to know how to do this so the list of available choices may be longer than the number of dropdowns. I'm pretty sure this is just managed on the PHP side, and won't have any implication on how the Ajax script works, but I thought I'd request the flexibility just in case.
Hopefully I've given you enough to go on. I know so very little about Ajax that I can describe what I want, but am much more comfortable in a server-side world.
Or maybe it's not Ajax at all, maybe there is a way to do this in jQuery instead?
Appreciate any help you can lend!