I work on JavaScript i display data on grid view using JavaScript and it display success on grid view gvResults using function GET_WORLD_BANK_LICN_DATA_REP()
so data display success on grid view gvResults using function below without any issue
my issue how to pass list of selected
P_LICNS_CURInfo[i].LICN_CIVIL_ID that have checkbox checked true from grid view to button
as separated comma to function getselected_civilid when press button btnRequestSearch
so suppose I display data and select checkbox checked for P_LICNS_CURInfo[i].LICN_CIVIL_ID as 1245,4321,7891,9918
then it will passed to function getselected_civilid() as "1245","4321","7891","9918" when press button below :
function getselected_civilid()
{
}
AND code below executed when display data on grid view using JavaScript
function GET_WORLD_BANK_LICN_DATA_REP() {
debugger
var P_ACT_ID_LIST = $('#ddl_activities').val();
var P_LICN_COUNT = $('#txtcountlicense').val();
var P_EXPIRY_YEAR = $('#txt_year').val();
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "../BusinessLayer/WebMethods.asmx/GET_WORLD_BANK_LICN_DATA_REP",
data: "{'P_ACT_ID_LIST':'" + P_ACT_ID_LIST + "','P_LICN_COUNT':'" + P_LICN_COUNT + "','P_EXPIRY_YEAR':'" + P_EXPIRY_YEAR + "'}",
dataType: "json",
beforeSend: function(xhr) {
xhr.setRequestHeader("STicket", MYLIBRARY.ReturnTicket());
$("#gvResults").empty();
},
success: function(Result) {
CloseLoading();
$.each(Result.d, function(key, value) {
if (value.Status == "1") {
if (value.P_LICNS_CURInfo != null) {
if (value.P_LICNS_CURInfo.length > 0) {
var rowNo = 0;
for (var i in value.P_LICNS_CURInfo) {
var row = " " + "" +
(rowNo + 1) + " " +
value.P_LICNS_CURInfo[i].comm_book_no + " " +
value.P_LICNS_CURInfo[i].LICN_COMM_NO + " " +
value.P_LICNS_CURInfo[i].LICN_CIVIL_ID + " " +
value.P_LICNS_CURInfo[i].LEGAL_STRACTURE_DESC + " " +
value.P_LICNS_CURInfo[i].ADDRESS_GOV_DESC + " " +
value.P_LICNS_CURInfo[i].MAIL + " " +
" ";
row = $(row).hide();
$('#gvResults').append($(row));
rowNo++;
$(row).fadeIn(1000);
}
}
}
} else {
ModelSuccessDanger('???? !!', value.StatusDesc, '0', null);
}
});
},
error: function(msg, status) {
CloseLoading();
if (status === "error") {
var errorMessage = $.parseJSON(msg.responseText);
}
}
});
}
How to get LICN_CIVIL_ID that have checkbox checked true separated comma when press button pass LICN_CIVIL_ID separated comma
1934,4332,8991,8881 to function getselected_civilid() using JavaScript ?