Update one list from another
Posted
by lacqui
on Stack Overflow
See other posts from Stack Overflow
or by lacqui
Published on 2010-05-20T22:44:25Z
Indexed on
2010/05/20
22:50 UTC
Read the original article
Hit count: 189
I have two multi-select lists in HTML - one of categories, and another of items. What I want is that, when an item selected in the "category" list, everything in the "items" list from that category is also selected.
For example, if "Categories" contains "Animal", "Mineral", and "Vegetable", and "Items" contains "Dog", "Cat", "Monkey", "Diamond", "Granite", "Carrot", "Tomato":
If "Animal" is selected in one list, "Dog", "Cat", and "Monkey" should be selected; any other selections should remain as they are.
I'm using a Symfony PHP backend on the server, if that makes any difference
© Stack Overflow or respective owner