我有一个带有remotefunction的javascript函数,在那个remotefunction中我想传递map有参数,我想在控制器操作中使用那个map变量,我不知道如何在ramotefunction的参数中传递它并使用它在那个特定的控制器动作中......
jQuery(document).ready(function(){
alert("checking for checkbox");
var countryId = document.getElementById("countryId").value;
jQuery('#groupdelete').on('click', function(){
var names = {};
alert("*********");
jQuery('input:checked').each(function() {
alert(jQuery(this).attr("id"));
if(jQuery(this).attr("id")) {
var id=jQuery(this).attr("id")
var costId = "c"+id
var ntb = document.getElementById(costId).value;
alert(ntb);
names[id] = ntb;
}
});
alert(names[1]);
})
${remoteFunction(action:'addLabServiceToCountry', controller:'country', params:'\'names=\'+names')}
})
params:'\'names=\'+names' which is not working properly, how to pass map variable in params of remotefunction and in contoller action how to access that.