Redirecting to external website from UI page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2015 05:45 AM
Hi all. I'm trying to set an automatic redirect from a UI page to a site outside of our SNC instance.
The redirect URL will differ according to the parameters of the UI page.
The parameters are stored in the variable sysparm_number.
This is what I have tried, but I'm only getting a blank frame.
Can anyone help me figure out what's wrong.
Processing script of the UI Page:
redirectTo();
function redirectTo() {
var url;
if(jelly.sysparm_number==1){url="http://www.site1.com";}
else if(jelly.sysparm_number==2){url= "http://www.site2.com";}
else if(jelly.sysparm_number==3){url="http://www.site3.com";}
else if(jelly.sysparm_number==4){url="http://www.site4.com";}
response.sendRedirect(url);
}
-Tapio

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2015 05:50 AM
Tried ?
window.location.href
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2015 08:32 AM
either of these should work for you
Similar behavior as an HTTP redirect
window.location.replace("http://yoursite.com");
Similar behavior as clicking on a link
window.location.href = "http://yoursite.com";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2017 11:09 AM
This works great! Is there a way to open in a new tab or window?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2017 05:46 PM
you could use window.open("http://yoursite.com")