her how to send an array of variables to be stored in the database getselection
I have a script like this
function save_pegawai(){
$('#fm').form('submit',{
url: url,
onSubmit: function(){
var nips = [];
var rows = $('#pegawai').datagrid('getSelections');
for(var i=0; i<rows.length;i++){
nips.push(rows
.nip);
}
alert((nips.join('\n'));
//return $(this).form('validate');
},
success : function(result){
var result = eval('('+result+')');
if(result.success){
//alert(nips.join('\n'));
// $('#dlg').dialog('close');//close dialog
//$('#dg').datagrid('reload'); //reload user data
}else{
$.messager.show({
title: 'Error',
msg: result.msg
});
}
}
});
}
how to store nips into the database.
help me? 