How do I force a details link to open in a new tab?

When adding a link to a table for a details page, is it possible to force the details page to open in a new tab?

Yes, open the column settings and set the “Open in New Window” to “Yes”

Yikes :man_facepalming:

Thank you.

1 Like

It’s actually relatively new. Even I forget about some features/settings we have in place. :stuck_out_tongue_winking_eye:

1 Like

Oh I totally do. It’s one of those “good problems to have”, so many features and settings that I get lost easy sometimes.

@moe Can the open link in new window option be added for Link Fields as well?

2 Likes

Definitely. Will add to this as well.

This has been added.

1 Like

I’m not seeing it here yet on the Link Page. Am I missing something?

Since this isn’t yet an option for the Links > Connected Page (Link Page) option, I wanted to provide the following solution.

  1. Edit the Link Page Column
  2. Add a CSS Class (my example will be “link-page.”
  3. Find the Component ID of the table
  4. Add the following code to the JavaScript of the page.

Javascript code below

TB.render('component_ID', function(data) {
	data.ele.find('.link-page a').attr('target','_blank');
});
$('body').on('keyup',function(){
    setTimeout(function(){
        $('.link-page a').attr('target','_blank');    
    },1000);
});

Please remember to change component_ID to your component ID found in step 3.

4 Likes

Chem,

Your solution works unless the table is the filtered result of a search component (even there, sometimes it works). As a workaround, I am advising users to right-click and choose “open link in new tab.”

Thanks Chem this a a good start, and its a shame that this won’t work as often as it will.

I have been trying to get it to work in an accordion, and on other complex pages with no joy. Opening in a new window (or access to Modal) is so important when building a complex work based app, and its a shame that this in not available everywhere inside Tadabase.

I’m sorry but this HAS to be a native function. I mean this is literally just adding two words and an equalsign to an a-Tag. We really should be able to tell every link to open in a new tab.
I have many pages that have multiple slightly modified instances of the same component on them with different view settings on the container to present the right information to the correct users. And for something as simple as “open link in new tab” I now need to add a ton of java script to my page.

1 Like