I am using custom button in the toolbar as per below code
<script type="text/javascript">
/*
CUSTOM TOOLBAR BUTTON
———————
caption: (string) the caption of the button, can be a empty string.
buttonicon: (string) is the ui icon name from UI theme icon set. If this option is set to “none” only the
text appear.
onClickButton: (function) action to be performed when a button is clicked. Default null.
position: (“first” or “last”) the position where the button will be added (i.e., before or after the
standard buttons).
title: (string) a tooltip for the button.
cursor : string (default pointer) determines the cursor when we mouseover the element
id : string (optional) – if set defines the id of the button (actually the id of TD element) for future
manipulation
*/
jQuery(document).ready(function(){
jQuery('#list1').jqGrid('navButtonAdd', '#list1_pager',
{
'caption' : 'Export Selected',
'buttonicon' : 'ui-icon-extlink',
'onClickButton': function()
{
// for all ids
// var allRowsOnCurrentPage = $('#list1').jqGrid('getDataIDs');
// for selected rows
var selectedRows = jQuery('#list1').jqGrid('getGridParam','selarrrow');
window.open("export.php?id="+selectedRows)
},
'position': 'last'
});
});
</script>
I want to execute bulk DB update when the button is clicked.Please help how to achieve this.