Click on link button needs to open page in new tab on the service portal

Raviteja K
Tera Expert

Hello All

I have an link button on service portal, when I click on link button it is opening in the same window but it need to be opened in the new tab.

On the same page we have link which when clicked opens in a new tab.

Any pointers how to fix this issue to open in a new tab.

Thanks in advance

8 REPLIES 8

Harshad Wagh
Tera Guru

HI,

 

Adding following may help.

 

target="_blank"

e.g.
<a id="myLink" href="www.google.com" target="_blank">google</a>



Thanks
Harshad

 

"target": {
"value": "_blank"

 

given in the same way but not working

may be try below.

 

<div onclick="openInNewTab('www.test.com');">Something To Click On</div>


if this dont work, share the complete link code, let me try at my end to see if I can make it work.

Thanks
Harshad

This is the code in the link button widget

CSS:

.btn-info {
font-size: 12px
}
.btn {
width: 152px;
float: left;
margin-top: 12px;
font-size: 13px;
}

.btn-primary {
border-color: white;
}

 

Additional options, JSON format:

 

{
"href": {
"value": "https:xxxxxxx",
"displayValue": "https://xxxxxxx"
},
"button_text": {
"value": "Chat with IT support",
"displayValue": "Chat with IT support"
},
"target": {
"value": "_blank"
}

}