
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2014 06:55 PM
Is there a way from a client script to determine if the current UI is UI14 or UI11?
We have a client script that we want to run if the current version is UI 14, but not if it's UI11. Essentially this has come from IE8 and below not supporting some of our customizations.
One way is to use Javascript to get the navigator.appVersion property and check the browser version, though this seems like it could get messy when the current UI version will give us the information we require.
Is there a built in property that will give us this information?
Cheers,
Dan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2014 06:09 AM
Good point, I suppose he would already know if the property was set to true or not anyway. I found something online that seems to work when I dumped it in an onLoad script:
function onLoad() {
//Type appropriate comment here, and begin script below
var browser=get_browser();
var browser_version=get_browser_version();
alert(browser + " - " + browser_version);
function get_browser(){
var ua=navigator.userAgent,tem,M=ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
if(/trident/i.test(M[1])){
tem=/\brv[ :]+(\d+)/g.exec(ua) || [];
return 'IE '+(tem[1]||'');
}
if(M[1]==='Chrome'){
tem=ua.match(/\bOPR\/(\d+)/);
if(tem!=null) {return 'Opera '+tem[1];}
}
M=M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?'];
if((tem=ua.match(/version\/(\d+)/i))!=null) {M.splice(1,1,tem[1]);}
return M[0];
}
function get_browser_version(){
var ua=navigator.userAgent,tem,M=ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
if(/trident/i.test(M[1])){
tem=/\brv[ :]+(\d+)/g.exec(ua) || [];
return 'IE '+(tem[1]||'');
}
if(M[1]==='Chrome'){
tem=ua.match(/\bOPR\/(\d+)/);
if(tem!=null) {return 'Opera '+tem[1];}
}
M=M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?'];
if((tem=ua.match(/version\/(\d+)/i))!=null) {M.splice(1,1,tem[1]);}
return M[1];
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2016 10:47 PM
If you want to execute the code when Users log into the Instance, you can utilize a global UI Script as shown in this post - How to change the size of custom company logo in banner?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2017 12:19 PM
Hi Christopher,
How could we take this script and (after detecting which browser) redirect those on IE8 to a different link. Those on other browsers can go through to the normal login page, but we'd like to redirect those on IE8 to our portal where they would login with IE10.
thanks,
Richelle