Splunk Search

How can we re-direct the URL in a new blank page using re-direct function ??

rakesh_498115
Motivator

Hi All,

I am using the following code snippnet in my HTML dashboard to re-direct the page to the defined URL on clicking on my dashboard.

Here i am able to navigate to different URL but loosing the control on the Parent Page i.e the new URL to open in a new blank document rather then on the same page. Is there any means to change /update the redirect function.

my code snippnet.

e.preventDefault();
            var url = TokenUtils.replaceTokenNames("http://localhost:8080/en-US/app/custom_app/dashboard?form.Operator=$row.Operator$&form.CarrierCode=$row.CarrierCode$", _.extend(submittedTokenModel.toJSON(), e.data), TokenUtils.getEscaper('url'));
            utils.redirect(url);

Many thanks.
Rakesh.

Tags (2)
0 Karma

rjthibod
Champion

was my answer helpful? if not, please clarify issues you have.

0 Karma

rjthibod
Champion

You can find the answer if you look in mvc.js in the SplunkJS source code (http://download.splunk.com/misc/sdk/webframework/splunkjsstack_1.1.zip)

There are two ways that are equivalent:
utils.redirect(url, false, "_blank");
utils.redirect(url, true);

0 Karma
Get Updates on the Splunk Community!

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...