Opening a Link in NEW Window

ursnani
Giga Guru

HI,

I have a SR which needs to display a couple of links.

I have used Macro for displaying those links, but the issue is when i click those links they are opening on the same window, i dont want that to happen. When the user clicks the link should oopen in a new window or new tab.

I know there is a way to achievie this and i was trying to remember thatbut i was unable to ?

Can anyone please help me?

1 ACCEPTED SOLUTION

Jon Barnes
Kilo Sage

if you are using an anchor "<a>" element, you can use target, like this: <a target="_blank" href="whatever">my link</a>. Keep in mind, modern browsers now seem to frown on this because they want the user to control where the link opens, and if the browser doesn't allow popups on your site, the user may not notice the browser has blocked a popup.



However, most browsers still support this convention.


View solution in original post

5 REPLIES 5

Jon Barnes
Kilo Sage

if you are using an anchor "<a>" element, you can use target, like this: <a target="_blank" href="whatever">my link</a>. Keep in mind, modern browsers now seem to frown on this because they want the user to control where the link opens, and if the browser doesn't allow popups on your site, the user may not notice the browser has blocked a popup.



However, most browsers still support this convention.


Thanks Jonathan It worked perfectly.


DK
Tera Contributor

Hi Jon,

 

could you help me on it please

it is File path url, How can we do it.

DK_0-1667917577670.png

 

var attachLink = '<a href="file://corp/sites...etc" target="_blank">' + 'Corp/sites' + '</a>'; //put your table name
template.print(attachLink + "<br/>");

 

in email preview it is not showing as clickable link. showing as normal text.

 

How can fix tis please

Nitin_NOW
Tera Guru

Where are you displaying the links ? Can you please put a screenshot of the form ?



Regards!