Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
How to create links in Service Portal that open in a new tab - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • How to create links in Service Portal that open in a new tab
KB0683847

How to create links in Service Portal that open in a new tab


33981 Views Last updated : Feb 20, 2025 public Copy Permalink English (Original)
  • English (Original)
  • Japanese
KB Summary by Now Assist

Issue

By default, all links open in the same window or tab. This article provides several options (using various widgets) for creating links in a Service Portal that open in a new tab.

Release

  All Releases

Resolution

Using link-button widget:

  1. Clone the widget first to allow customization.
  2. On the HTML Template field on the widget, add in the attribute of target="_blank" so it's like this:
    <a target="_blank" ng-href="{{options.href}}" class="btn btn-{{options.color}} m-b" role="button">{{data.buttonMsg}}</a>

Using Icon Link widget:

  1. Clone the widget first to allow customization.
  2. In the widget editor, click the menu icon and click Edit option schema.
  3. Click the + icon to add a widget option as follows:
      • Label: Target
      • Name: target
      • Type: Choice
      • Choices: _blank, _self, etc. (you may add more options that make sense for link type such as _top)
    In the widget options pane, the label is set to Target, the name is set to Target, the type is set to Choice, and the choices listed are _blank, _top, _self, and _parent
  4. Now, whenever this widget is used there would now be the option to select the target type for the link. Setting it to _blank will make the links open in a new tab.
    The widget now displays an option to set the target to _blank
  • This works because of how the widget was already configured to receive the additional option (target).
    • In the HTML template, each anchor tag (<a/>) has this attribute already: target="{{::data.target}}" which is defined in the Server Script field of the widget: data.target = options.target || ""

Using HTML widget:

  1. Add the HTML widget to a page as normal.
  2. On the HTML field of the widget create a link by going to the source code (using the <> icon on the editor).
  3. Put the target attribute with value _blank as seen in the image or example code below for the link:
    The Source code pane displays the <a> tag with the new attribute _blank. See the example code below this image for additional information.
    (<a href="http://yourlink.com" target="_blank">Your link text</a>)

  


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.