Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple: checkbox 1

Status
Not open for further replies.

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?

[conehead]
 
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]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top