This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 15376
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
It is sorta covered in the JavaRanch Style Guide.
subject: checkbox
Similar Threads
Strange - Page Submits!!!
WA #1.....word association
Which Box belonged to Mr Mathur ?
WA #2 ..... word association
how to do