
- 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-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
07-28-2016 07:35 AM
Hi Christopher,
May I know where you have written this onLoad() script?
It would be helpful if you share here.
Thanks & Regards,
Ram Prakash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2016 11:52 AM
Hi Ram,
I think it was just in a client script, I forget on which table but it shouldn't matter really, I just wanted to verify if the code would work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2016 02:06 AM
Hi Christopher,
Not sure on which table I need to write this code.
Can you please check and let me know that?
Thanks & Regards,
Ram Prakash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2016 08:35 AM
Hi Christopher,
Do you have any idea how to show it while logging in the instance?
Thanks & Regards,
Ram Prakash