I have three radio buttons called radiogroup, I would like to have an alert if one of them have not been selected stating "you must select one" and then if one has been selected to call a function called claculate.
any ideas how to write this?
I have three radio buttons called radiogroup, I would like to have an alert if one of them have not been selected stating "you must select one" and then if one has been selected to call a function called claculate.
any ideas how to write this?
Hi Brian,
Check if you select radio value: preif (!Apperyio("mobileradiogroupName").find(":checked")){
alert("you must select one");
}/pre
Then run calculate function:preApperyio("mobileradiogroupName").find("input").each(function(){$(this).on("change", calculate);});/preWhere mobileradiogroupName is a name of mobileradiogroup component.
You can run this code on page Load event.
Hello Brian,
We advise that you use such javascript code:
codeif (Apperyio("radiogroup").find(":checked").length == 0){
alert("you must select one");
}else{
//
} /code
thank you that worked...