I have a list of radio buttons while selecting I am facing one issue with below code as i am getting only value of first radio button in my js function for others (i mean other
var radioValueArrya = [];
$("#r1").each(function() {
if($(this).is(':checked'))
radio1=$(this).val();
radioValueArrya.push(radio1);
alert("radio select values"+radio1);
});
$("#r2").each(function() {
if($(this).is(':checked'))
radio2=$(this).val();
radioValueArrya.push(radio2);
alert("radio select values"+radio2);
});
// controller call
$("#divid").load("${contextPath}/actionName?kRadio="+escape(radio1) +"" +
"&sRadio="
+"" +escape(radio2)+"&radioValueArrya="+radioValueArrya);
And in your JSP file use
And in your Controller add parameter @RequestParam List
in your method