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
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.