Mar 7, 2006 #1 TheConeHead Programmer Joined Aug 14, 2002 Messages 2,106 Location US when one checkbox is selected, I want to make sure another one is unchecked - how would I go about this?
when one checkbox is selected, I want to make sure another one is unchecked - how would I go about this?
Mar 7, 2006 1 #2 cLFlaVA Programmer Joined Jun 14, 2004 Messages 6,450 Location US you would typically use radio buttons. that's what they're there for. but, here's what you'd do: Code: <input name="cb1" type="checkbox" onclick="if (this.checked) this.form.cb2.checked = false;" /> <input name="cb2" type="checkbox" onclick="if (this.checked) this.form.cb1.checked = false;" /> *cLFlaVA ---------------------------- [tt]( <P> <B>)13 * (<P> <.</B>)[/tt] [URL unfurl="true"]http://www.coryarthus.com/[/url] Upvote 0 Downvote
you would typically use radio buttons. that's what they're there for. but, here's what you'd do: Code: <input name="cb1" type="checkbox" onclick="if (this.checked) this.form.cb2.checked = false;" /> <input name="cb2" type="checkbox" onclick="if (this.checked) this.form.cb1.checked = false;" /> *cLFlaVA ---------------------------- [tt]( <P> <B>)13 * (<P> <.</B>)[/tt] [URL unfurl="true"]http://www.coryarthus.com/[/url]