Onchange dropdown scenario
I have a dropdown populated with ids from a column on a da开发者_如何转开发tabase. I then have a second dropdown that is TO be populated by data from the same database, but these change according to the id that is picked on the first dropdown. I am using php, html, and guess i need to use javascript, please help.
You're talking about linked select boxes, or a select chain. I've used the jQuery plugin, selectchain with success in the past, but there are many others, so choose your poison.
In essence, using some simple PHP you expose your choice lists as JSON data sources, which then get linked together with the plugin.
Select Chain plugin
精彩评论