below is only a part of my javascript code. confirmation message is not firing.
function PKId_delete_formatter(cellvalue, options, rowObject) {
return '<a href="JqGridClients/Delete?id=' + cellvalue + '" onclick="return confirm("Are you sure want to delete?");" class="ui-icon ui-icon-trash"></a>';
}
I think the above code is enough, please let me know if more code is needed
Use this:
return '<a href="JqGridClients/Delete?id=' + cellvalue + '" onclick="return confirm(\'Are you sure want to delete?\');" class="ui-icon ui-icon-trash"></a>';
It inserts the proper quotes for the confirm
.