I want to create a quiz by using check box
but what should I do, to make a user can only click one check box at time
on (press){
if (a1.getValue() == true) {
display1 = " Sorry Your answer is wrong";
display2 = " The correct answer is: The Congo"
}
if (a2.getValue() == true) {
display1 = " Sorry Your answer is wrong";
display2 = " The correct answer is: The Congo"
}
if (a3.getValue() == true) {
display1 = " Sorry Your answer is wrong";
display2 = " The correct answer is: The Congo"
}
if (a4.getValue() == true) {
display1 = " you are right “;
display2 = " Your general knowledge is very good”
}
}
thank you very much
hi,
I am prathap,
I am sorry my friend. I kow it can be done. But for time being I can give you an other alternative what I know.
Instead of using checkbox you can use radio buttons.
In the radio button just set the same group name to all the buttons.
Then you can check my friend,
you try with this, I will go through the check box now and let you know if I find any solution
bye,
Prathap
thank you bsprathapsimha
radio buttons is the way to go.