cancel
Showing results for 
Search instead for 
Did you mean: 

Pop up notification on checking browser version

Former Member
0 Kudos

Hi All,

We have got a requirement to notify users who are using IE11 browser to access BSP application.

Currently, clicking on a portal link takes us to the BSP page but the application is giving issues further for IE11 users.

So we want to notify users before hand that this is not going to work for IE11 and they can use lower broswer to do their work.

So, there would be following things which we need to achieve:

1. Check the browser version

2. If browser version is IE11, give notification pop up/window with the message written on it.

3. Clicking on OK should take the user out of the BSP application and back to portal page.

I am new to BSPs. I just know that this needs to be done in JS but have no idea how to do it.

Please guide me through this. Any pointers will be helpful.

Thanks

Natasha Garg

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Natasha,

I found following script code for IE11.

      function chk_browser( ){          

        var Browser = {               

        chk : navigator.userAgent.toLowerCase()          

        } 

                           

        Browser = {              

         ie9 : Browser.chk.indexOf('trident/5.0') != -1,              

         ie10 : Browser.chk.indexOf('trident/6.0') != -1,              

         ie11 : Browser.chk.indexOf('trident/7.0"') != -1,              

         ie : Browser.chk.indexOf('msie') != -1,                         

        opera : !!window.opera,               

        safari : Browser.chk.indexOf('safari') != -1,               

        safari3 : Browser.chk.indexOf('applewebkir/5') != -1,              

        mac : Browser.chk.indexOf('mac') != -1,              

       chrome : Browser.chk.indexOf('chrome') != -1,              

       firefox : Browser.chk.indexOf('firefox') != -1         

       }         

      if ( Browser.ie10 ) {              

        alert('ie10');         

      }         

     else if(Browser.ie9) {              

       alert( 'ie9' );         

      }                    

     else if(Browser.ie11) {               

       alert( 'ie11' );          

     }                    

    else if(Browser.chrome) {               

      alert( 'chrome' );          

    }          

    else if(Browser.firefox) {               

      alert( 'fierfox' );          

    }          

   else if(Browser.ie) {               

     alert( 'ie<9' );          

   }                    

   else {              

     alert( 'Unknown' );         

   }       

}

Best regards,