CHtmlView and IE version
-
When using CHtmlView (and using Javascript to get the broswer version), I get version 4( corresponding to IE4 to IE6)... whereas I would like the latest installed version to use... Does anyone know how/if this is possible? I am doing this so I can run flash controls in the control - and so that they can call Jasvascript functions... Any pointer for that would be welcome too... it seems only possible in http but not on local files... Thanks in advance! Jerome
-
When using CHtmlView (and using Javascript to get the broswer version), I get version 4( corresponding to IE4 to IE6)... whereas I would like the latest installed version to use... Does anyone know how/if this is possible? I am doing this so I can run flash controls in the control - and so that they can call Jasvascript functions... Any pointer for that would be welcome too... it seems only possible in http but not on local files... Thanks in advance! Jerome
BadJerry wrote:
using Javascript to get the broswer version
The actual version of the browser is contained in the navigator.userAgent property and is typically extracted with a regular expression. For instance one of my test machines is still running Internet Explorer 6.0. The userAgent field returns the following: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727) To extract the version information you can use the following:
var exp = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
var version = 0;
if (null != exp.exec(navigator.userAgent)) {
version = parseFloat( RegExp.$1 )
}1300 calories of pure beef goodness can't be wrong!