Jump to content
  • 0

Warn endusers their browser will not support all fuctions of our application at the login screen based on agent


jbemerge

Question

Looking for a way when an end-user goes to login, if they are using a browser other then Chrome, Firefox or Safari, they receive a notification (window popup or something that lets them know “if they continue with their current browser, some functions will not work…etc etc”. Please contact your IT department or download one of the supported browsers)

How would I go about doing this?

Thank you for your direction and time.

Josh

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi @jbemerge,

You can use the code below, I've tested this already and it is working. The code below will detect if the user is using Google chrome or not

<script type="text/javascript">
document.addEventListener('DataPageReady', function (event) {
// please note, 
// that IE11 now returns undefined again for window.chrome
// and new Opera 30 outputs true for window.chrome
// but needs to check if window.opr is not undefined
// and new IE Edge outputs to true now for window.chrome
// and if not iOS Chrome check
// so use the below updated condition
var isChromium = window.chrome;
var winNav = window.navigator;
var vendorName = winNav.vendor;
var isOpera = typeof window.opr !== "undefined";
var isIEedge = winNav.userAgent.indexOf("Edge") > -1;
var isIOSChrome = winNav.userAgent.match("CriOS");

if (isIOSChrome) {
   // is Google Chrome on IOS
} else if(
  isChromium !== null &&
  typeof isChromium !== "undefined" &&
  vendorName === "Google Inc." &&
  isOpera === false &&
  isIEedge === false
) {
  // Change the alert message to your Liking
   alert("I am an Google Chrome!");
} else { 
  // Change the alert message to your Liking
    alert("I am not Google Chrome!");
}

});
</script>

You can use it as it is, just add a Header and Footer to your DataPage. Click on footer, then click on advance tab and ensure 'Enable  HTML editor' is unchecked. Then go back to the Standard tab and past the code above.

Hope this helps.

Regards,

TsiBiRu 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...