Question

I couldn't find an answer to this problem with submitting an array of arrays when i select multiple checkboxes. I am able to pass it to my struts action but it is just considered as a single object. I was expecting multiple objects in a list but i only get one. The console return a value of 1 for x (always). Can anyone help in correcting this code, please?

thanks again.

here is my jquery code:

var checkosbrowser=$('#oidtable').find('input[type=checkbox]');
    var selDataList = [];
    var vaOSBrowser;
    for(var i=0;i<checkosbrowser.length;i++){
        vaOSBrowser = [];
        if(checkosbrowser[i].checked){
            var p = checkosbrowser[i].parentNode.parentNode;
            var id=p.id;
            vaOSBrowser.push($('#oidtable').jqGrid('getCell',id,'environment'));
            vaOSBrowser.push($('#oidtable').jqGrid('getCell',id,'onlineID'));
            vaOSBrowser.push($('#oidtable').jqGrid('getCell',id,'releaseDate'));
            selDataList.push(vaOSBrowser);
        }
    }
    alert("array list is " + selDataList.toString());
    var selData = document.getElementById("selectedDataList");
    selData.value = selDataList;

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top