The moose likes HTML, CSS and JavaScript and the fly likes checkbox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "checkbox" Watch "checkbox" New topic


akash kadarla

Joined: Feb 25, 2005
Posts: 9
i want the code for

a an alert box should be displayed when more than one check box is selected
Tom Blough
Ranch Hand

Joined: Jul 31, 2003
Posts: 263
If you want one and only one check box, then use radio buttons. It's better to prevent user errors than to check and notify.


Tom Blough<br /> <blockquote><font size="1" face="Verdana, Arial">quote:</font><hr>Cum catapultae proscriptae erunt tum soli proscripti catapultas habebunt.<hr></blockquote>
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
As Tom said, a radio button will only allow for one value to be selected. It would be the best route to do that.

If you still want to use a checkbox,

You can call this onsubmit of your form

Hope this helps
I agree. Here's the link:
subject: checkbox
It's not a secret anymore!