I am trying to select values in one table so that according to the selected value, the values in the other table changes. I am trying to achieve this using jQuery jTable. I have got the values in both the table but when I select a value in table 1, the values in the table 2 remains the same, Here my table 1 is #selecteventtype and table 2 is selecteventcode. My jQuery code for the selectionchanged is
selectionChanged: function () {
var $selectedRows = $('#selecteventtype').jtable('selectedRows');
if ($selectedRows.length > 0) {
$selectedRows.each(function () {
var record = $(this).data('record');
selectedtype = record.irs_type;
$('#selecteventcode').jtable('load', irs_type:selectedtype );
console.log(selectedtype)
});
}
},
Can someone help me with this
Thanks
Try
$('#selecteventcode').jtable('load', {irs_type:selectedtype} );