Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: JJ Newsgroups: comp.lang.javascript Subject: Re: radiobuttons and checkboxes Date: Tue, 16 Oct 2012 14:58:56 +0000 (UTC) Organization: A noiseless patient Spider Lines: 25 Message-ID: References: Injection-Date: Tue, 16 Oct 2012 14:58:56 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="904c555971ca2171d99874e113a9e21d"; logging-data="22766"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/vvEBpVTvWPjyltiXjdJTOCuZD5t3E97o=" User-Agent: Xnews/5.04.25 X-Face: \*\`0(1j~VfYC>ebz[&O.]=,Nm\oRM{of,liRO#7Eqi4|!]!(Gs=Akgh{J)605>C9Air?pad{sSZ09u+A7f<^paR"/NH_# wrote: > The user needs to select one or more items. I can't use radio button > sets because that limits you to only one selected item, but if I use > checkboxes it means users can have no selected items. > > My options are: > > 1. Use checkboxes and when the user submits the form tell them to make > a selection if no selection has been made. This seems the obvious > choice but I'd rather solve the problem with design rather than > message boxes. > > 2. Use checkboxes and don't let the user uncheck the last checked > checkbox in the set. This means that a checkbox may not behave as > expected. > > Or is there some other control that I can create/design that is > intuitive to use to achieve the same thing? > > Andrew Poulos Third option would be to allow all checkboxes to be selected, but once none of them is selected (checked via script), disable the submit button. Enable it again when one is selected.