Hi folks,
I've got a page that is dynamically written (asp) It breaks out like this
Country 1
- Section/District 1
- Town 1
- Town 2
- Town 3
- Section/District 2
- Town 1
- Town 2
Country 2
- Section/District 1
- Town 1
- Town 2
- Section/District 2
- Town 1
- Town 2
each country/district/town has a checkbox next to it.
What I'd like to do - is if a person clicks a checkbox next to a country - every district & town is also checked (or unchecked if unchecked). And if instead the user decides to check say only District 1 in Country 1 than all Towns in District 1 are checked/unchecked.
In addition, it'd be neat if one particular town is unchecked than the country/district unchecks itself - but leaves anything checked - checked.
I've found some to do portions of that - but not two levels deep as I need. I can write out the checkboxes in any manner necessary.
Does anyone have an idea on how to do this? my JavaScript abilities are next to none.
Thank you in advance.
Stuart
I've got a page that is dynamically written (asp) It breaks out like this
Country 1
- Section/District 1
- Town 1
- Town 2
- Town 3
- Section/District 2
- Town 1
- Town 2
Country 2
- Section/District 1
- Town 1
- Town 2
- Section/District 2
- Town 1
- Town 2
each country/district/town has a checkbox next to it.
What I'd like to do - is if a person clicks a checkbox next to a country - every district & town is also checked (or unchecked if unchecked). And if instead the user decides to check say only District 1 in Country 1 than all Towns in District 1 are checked/unchecked.
In addition, it'd be neat if one particular town is unchecked than the country/district unchecks itself - but leaves anything checked - checked.
I've found some to do portions of that - but not two levels deep as I need. I can write out the checkboxes in any manner necessary.
Does anyone have an idea on how to do this? my JavaScript abilities are next to none.
Thank you in advance.
Stuart