I'd like to make a hierarchical select box: However, requirements are
only children (that have no children themselves) are selectable.
So here's a snip of what the select box's options might look like:
US Department of Education
-Office of Safe and Drug Free Schools
US Department of Health and Human Services
-Substance Abuse and Mental Health Services Administration
--Center for Substance Abuse Prevention
--Center for Substance Abuse Treatment
--Center for Mental Health Services
--Office of Policy and Coordination, Planning and Budget
-Centers for Disease Control and Prevention
-Administration for Children and Families
--Family and Youth Services Bureau
-National Institutes of Health
--National Institute on Drug Abuse
---Office of the Assistant Secretary for Planning and Evaluation
<snip/>
I took a look at <option>'s "disable" attribute, which would be
perfect. Unfortunately, it seems almost wholly unsupported.
Other options are:
* controlling what is selectable using JavaScript. The problem is
that while I can use JS, I _cannot rely on it_ so I would have to
back this up with server-side validation. Problem is it might be
awkward to explain to a non-JS user what's selectable and what's not.
* Break the interface into (potentially) three different pages (one
for each level), and have a select box on each page.
* Make the whole thing a radio button list, and just display the
giant hierarchy in the form (uggh)
Elegant solutions, anybody?
Thanks,
Jamie