
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2014 11:55 AM
Hello All,
There was a page created outside of service now. We want to make it so that if someone picks something specific from a drop down it redirects to our internal internet site. Is there anyway to do this?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2014 10:55 AM
Found my own answer. Looks like I just need a client script for on change and look for when the variables changes.
function onChange(control, oldValue, newValue, isLoading) {
if (!isLoading) {
var reqType = g_form.getValue('request');
if (reqType == 'Redirect URL') {
window.open("http://www.google.com");
window.location = 'home.do';
}
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2014 10:55 AM
Found my own answer. Looks like I just need a client script for on change and look for when the variables changes.
function onChange(control, oldValue, newValue, isLoading) {
if (!isLoading) {
var reqType = g_form.getValue('request');
if (reqType == 'Redirect URL') {
window.open("http://www.google.com");
window.location = 'home.do';
}
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2020 05:44 PM
Hi Brian
I used the mentioned onChange script but without success
Requirements:
If variable (what_would_you_like_to_do) selection changes to 'Create New Catalog Item' then redirect to https://mhsdev.service-now.com/sp?id=sc_cat_item&sys_id=70651f5c1b55141027a8620bbc4bcb92
=====Here is the onChange script I am using=====
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
//Type appropriate comment here, and begin script below
if (newValue == 'Create New Catalog Item'){
var redirectURL = 'https://mhsdev.service-now.com/sp?id=sc_cat_item&sys_id=70651f5c1b55141027a8620bbc4bcb92';
top.window.location = redirectURL ;
}
}
see attachment for screenshot

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2020 05:50 PM
try
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
//Type appropriate comment here, and begin script below
if (newValue == 'Create New Catalog Item') {
top.window.setTimeout(fun2);
}
function fun2() {
top.window.location = "https://mhsdev.service-now.com/sp?id=sc_cat_item&sys_id=70651f5c1b55141027a8620bbc4bcb92";
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2020 05:59 PM
Thanks Mike but earlier I did try that same script to no success.