I have action button for editing that doesn't have option "Open in new tab" when i right click. Here is my code:
function actionsTemplateConversion(data) {
if (data != null){
if (canEdit){
row += '<a id="edit" title="${editTr}" onclick="edit(event);"></a>';
}
return row;
}
}
function edit(event) {
table = $('#table').data();
var dataItem = table.dataItem($(event.currentTarget).closest("tr"));
window.location = "users/"+dataItem.id+"/editUser.html?id="+"${id}"+"&name="+"${name}";
}
I've tried use href instead onclick and put this link from edit() function in href and with that i get option Open in new tab for right click, but also there is problem with this because if there is single qoutes in name than everything meesses up because of that qoutes. So only way is with this function. I also tried with this window.location.href but it doesnt work. Is there any other option for opening link beside window.location?