| Author |
Button action depending on checkbox selection.
|
Robert Liguori
Author
Ranch Hand
Joined: Nov 27, 2007
Posts: 426
|
|
If a checkbox is not checked in JSF, I wish to open up a javascript warning when the commandButton is pressed.
How do I do this?
|
Robert J. Liguori - OCA Java SE 7 Programmer I Study Guide (Exam 1Z0-803)
|
 |
Karanjit Singh
Greenhorn
Joined: Oct 17, 2010
Posts: 15
|
|
Just use normal javascript to do this as follows:
if(!document.getElementById(idOfCheckBox).checked)
{
alert('Check Box Not Selected');
return false;
}
|
 |
 |
|
|
subject: Button action depending on checkbox selection.
|
|
|