Lookup links open in new tabs
- This topic has 4 replies, 2 voices, and was last updated 6 years, 1 month ago by .
Viewing 4 reply threads
Viewing 4 reply threads
- You must be logged in to reply to this topic.
Home › Forums › General discussion › Lookup links open in new tabs
Hi Alex,
I was wondering if you can advise/suggest what to do here. In SharePoint List A, the lookup column appears as link to an item from SharePoint List B. When I click on the lookup link from SharePoint List A, I would like the link to open in a new tab.
I tried a number of ways however did not work.
Thank you in advance.
Mark
Hi,
Is this in a list view or in your display form?
Alexander
This is in a display form with tabs.
You can add this to your Custom JS to force all anchor tags to open in a new tab:
jQuery(".ms-formbody").on("mouseover","a",function(){
jQuery(this).attr("target","_blank");
});
If you only want to target one specific field you can change it like this:
jQuery("#dffs_YOUR_FIELD_INTERNAL_NAME_HERE").on("mouseover","a",function(){
jQuery(this).attr("target","_blank");
});
Alexander
Thank you. Much appreciated.