PDA

View Full Version : How to check that if detected browser is firefox 3.6+ ?



renganathan
4 Jul 2014, 3:19 AM
Hi All,

I want to check that browser detected is firefox 3.6+

Is the following code is right way to do that ?



if(Ext.firefoxVersion >= 3.6)
{
// do stuff
}
else
{
// alert not supported browser
}



Please suggest the efficient way to do

Gary Schlosberg
14 Jul 2014, 5:50 AM
Seems like the way to do this. Is it working for you?

vipul.suthar
14 Jul 2014, 6:55 PM
Try Ext.isFF3_6 (http://docs.sencha.com/extjs/4.2.2/#!/api/Ext-property-isFF3_6)

if still not work then go native


navigator.sayswho= (function(){ 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.join(' ');})();