473,587 Members | 2,258 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Looking for Solutions for Hierarchical Selection

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
Jul 20 '05 #1
4 3872
Jamie Jackson <mc************ *************@h otmail.com> writes:
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
<snip/>

I took a look at <option>'s "disable" attribute, which would be
perfect. Unfortunately, it seems almost wholly unsupported.

Other options are:
* Break the interface into (potentially) three different pages (one
for each level), and have a select box on each page.
Or have three radio buttons, each of which has a select box next to
it. That could be confusing for users, though.
* Make the whole thing a radio button list, and just display the
giant hierarchy in the form (uggh)
This might not be so bad, unless it's a really long radio button
list. It's not as if the form needs to be fitted into a small space,
is it?
Elegant solutions, anybody?


<optgroup> if you only have one level. Never needed it myself so you'd
have to check browser support, but it does have a way to give graceful
fallback. But from the example it looks like you have more than one level.

--
Chris
Jul 20 '05 #2
On 16 Jun 2004 10:18:22 +0100, Chris Morris <c.********@dur ham.ac.uk>
wrote:
Jamie Jackson <mc************ *************@h otmail.com> writes:
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
<snip/>

I took a look at <option>'s "disable" attribute, which would be
perfect. Unfortunately, it seems almost wholly unsupported.

Other options are:
* Break the interface into (potentially) three different pages (one
for each level), and have a select box on each page.


Or have three radio buttons, each of which has a select box next to
it. That could be confusing for users, though.
* Make the whole thing a radio button list, and just display the
giant hierarchy in the form (uggh)


This might not be so bad, unless it's a really long radio button
list. It's not as if the form needs to be fitted into a small space,
is it?
Elegant solutions, anybody?


<optgroup> if you only have one level. Never needed it myself so you'd
have to check browser support, but it does have a way to give graceful
fallback. But from the example it looks like you have more than one level.


Thanks for the optgroup tip: I gave it a shot and it worked pretty
well in most browsers. I think we're going to end up going with kind
of a flat, acronym-based hierarchy, though (decent looking and
simple):

<select name="thing">
<option>ED: OSDFS</option>

<option>HHS: SAMHSA: CSAP</option>
<option>HHS: SAMHSA: CSAT</option>
<option>HHS: SAMHSA: CMHS</option>
<option>HHS: SAMHSA: OA: OPC</option>
<option>HHS: CDC</option>
<option>HHS: ACF: ACYF: FYSB </option>
<option>HHS: NIH: NIDA</option>
<option>HHS: OS: OASPE</option>

<option>HUD: CPD: SNAPS</option>

<option>DOJ: OJP: OBMS</option>
<option>DOJ: OJP: BJA</option>
<option>DOJ: OJJDP: OVC: TAPIR</option>
<option>DOJ: OJP: NIJ</option>
<option>DOJ: OJP: CCDO</option>
<option>DOJ: OVW</option>
<option>DOJ: BOP: ISDP</option><!-- ? --->
<option>DOJ: BOP: ORE</option>
<option>DOJ: BOP: NIC</option>
<option>DOJ: BOP: NIC: CC/Prisons Div.</option>
<option>DOJ: COPS</option>
<option>DOJ: USPC</option>

<option>White House: FBCI</option>

<option>VA: Homeless Veterans Program Office</option><!-- ? couldn't
find -->

<option>DOL: ETA: OYS</option>
<option>DOL: ETA: OYS: Div. of Field Svcs. &amp; TA</option>
<option>SSA: DCDISP: Ofc. of Income Sec. Progs.</option>
<option></option>

</select>

Thanks,
Jamie

Jul 20 '05 #3
Jamie Jackson <mc************ *************@h otmail.com> writes:
On 16 Jun 2004 10:18:22 +0100, Chris Morris <c.********@dur ham.ac.uk>
wrote:
<optgroup> if you only have one level. Never needed it myself so you'd
have to check browser support, but it does have a way to give graceful
fallback. But from the example it looks like you have more than one level.
Thanks for the optgroup tip: I gave it a shot and it worked pretty
well in most browsers. I think we're going to end up going with kind
of a flat, acronym-based hierarchy, though (decent looking and
simple):


I take it this is for a form where all the users will be legitimately
expected to understand the acronyms on sight because they work with
them regularly anyway? For any normal person that thing below will be
completely unusable.
<select name="thing"> .... <option>HHS: SAMHSA: OA: OPC</option> .... <option>DOJ: OJJDP: OVC: TAPIR</option>

....

Another idea: what about radio buttons contained in fieldsets?

<fieldset><lege nd>Whatever DOJ stands for</legend>

<fieldset><lege nd>Whatever OJJDP stands for</legend>

<fieldset><lege nd>Whatever OVC stands for</legend>
<label for="c1"><input id="c1" type="radio" name="thing" value="DOJ:
OJJDP: OVC: TAPIR"> TAPIR</label>

<label for="c2"><input id="c2" type="radio" name="thing" value="DOJ:
OJJDP: OVC: Something"> Something else in OVC</label>

</fieldset>
<fieldset><lege nd>Something other than OVC in OJJDP</legend>
...
</fieldset>
...
</fieldset>
....
</fieldset>

Could still be fairly compact, but would also be fairly easy to
use. You might want to play around with CSS borders on the <label>s to
make it visually clearer which radio button goes with which label, and
likewise perhaps on the fieldsets to make the hierarchy clearer.

--
Chris
Jul 20 '05 #4
On 16 Jun 2004 17:14:21 +0100, Chris Morris <c.********@dur ham.ac.uk>
wrote:
I take it this is for a form where all the users will be legitimately
expected to understand the acronyms on sight because they work with
them regularly anyway? For any normal person that thing below will be
completely unusable.
Yup, they should be very familiar with these acronyms. However, the
boss just shot down the idea for the very same reason you stated. ;-)
Another idea: what about radio buttons contained in fieldsets?

<fieldset><leg end>Whatever DOJ stands for</legend>

<fieldset><lege nd>Whatever OJJDP stands for</legend>

<fieldset><lege nd>Whatever OVC stands for</legend>
<label for="c1"><input id="c1" type="radio" name="thing" value="DOJ:
OJJDP: OVC: TAPIR"> TAPIR</label>

<label for="c2"><input id="c2" type="radio" name="thing" value="DOJ:
OJJDP: OVC: Something"> Something else in OVC</label>

</fieldset>
<fieldset><lege nd>Something other than OVC in OJJDP</legend>
...
</fieldset>
...
</fieldset>
...
</fieldset>

Could still be fairly compact, but would also be fairly easy to
use. You might want to play around with CSS borders on the <label>s to
make it visually clearer which radio button goes with which label, and
likewise perhaps on the fieldsets to make the hierarchy clearer.


The boss decided she liked an optgroup solution, but we had both
assumed that optgroup could be styled to match the rest of the options
(there are political reasons for this). Since optgroup is pretty much
untouchable WRT css (I've just found out), we may have to consider
something like what you suggested.

Thanks for sticking with this thread. :D

Jamie
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2038
by: Reimar Bauer | last post by:
Hi all, I would like to use a hierarchical group oriented encryption. Is there something implemented or did you know something I could use? For explanaition. If you have a large building there are several keys available. Each person has a key to open his/her room. Probably this key is able to open rooms of the group of this person.
1
3672
by: ALEX KLEIN | last post by:
I want to use fabricated hierarchical recordset in VB6 using ADO. I wrote code like dim rs as adodb.recordest set rs=new adodb.recordest rs.fields.append "a1",adChar,30 Then in loop I put rs.addnew rs("a1")=... re.update when I associated this with hierarchical flexgrid I saw what I expected. On
6
3663
by: Bob Alston | last post by:
I am looking for Access reporting add-in that would be easy to use by end users. My key focus is on selection criteria. I am very happy with the Access report writer capabilities. As far as development of reports, it is certainly fine in my book. But for end-users, with little experience or training, it would be nice to have an easy way...
30
2332
by: Vadim Tropashko | last post by:
Reposting with more clarification (as Jan asked). Suppose I have a BNFgrammar and a source text parsed into a tree. How would I query an identifier declaration? All the XQuery tutorials (where I went to gather some ideas) start with simpleminded examples like browsing all the descendants of / bookstore/book (and the bookstore XML design...
0
7843
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8205
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8339
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6619
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3840
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3872
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2347
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.