Hi,
I’m having the following javascript code,after all the checkboxes are unslected,I’ll display the alert to user saying that “Atleast one must be selected”,but the checkbox is becoimng unselected after throwing Alert,how to make check box to remain selected after throwing this alert.
var checkSelected = false;
for (i = 0; i < planForm.locationOptions.length; i++) {
if (planForm.locationOptions[i].checked) {
checkSelected = true
document.planForm.action=’refreshPlanView.do’;document.planForm.submit();
document.getElementById(“refreshing”).style.display=”block”;
}
}
if (!checkSelected) {
alert(“At least ONE Location must be selected!”);
return false;
}
return true;
}
Please advise..
Thanks,
Kumar