I have a table and the rows are clickable, but they don’t have the mouse middle click option.
This is one of those td’s, can I add this middle click functionality via js?
<td data-datatype="date" data-id="109" class="portalTable hyperlink-li portal-todo-row viewed">
A quote for which you are the assigned sales person has been in progress for an extended period of time - quotes should not be left in progress this long. (uukuk-Monday, 18 March, 2019) </td>
$(document).on('click', '.portal-todo-row', function () {
var portalToDoId = $(this).data("id");
GetToDoItemLink(portalToDoId);
});
function GetToDoItemLink(portalToDoId) {
ToggleFullPageLoading(true);
$.ajax({
url: $("#hdnGetToDoItemLinkUrl").val(),
type: "POST",
data: { id: portalToDoId },
dataType: "json",
success: function (data) {
if (data.success) {
window.location = data.redirectUrl;
} else {
ToggleFullPageLoading(false);
DisplayValidationErrors(data);
}
}
});
}
Hi m_hutley, ye it fires at the moment on left click. But the manager wants the middle click option, and have tried a few things before posting it, but cant figure it out.
Well i’m not sure what you’re trying to accomplish, as you’ve not told me what your code is meant to do.
My understanding is that opening a tab with the middle mouse click on a link is a Browser function, not a javascript one, so you wouldnt be able to override the browser’s settings.
Edit: The middle-click functionality described is on a link, rather than a TD.
ye sorry m_hutley, they are table rows, and when they are clicked they take the user to a page that has a specific ID, but ideally they need to keep the table open as well, so ideally I need the middle click option to allow a new tab to be created.