The code below is to test for IE7 or 8 to inform the viewer of incompatibility, but it doesn't work. The first alert does show 7 or 8, but the second alert never displays, I have tried it as 7.0 and just 7.
Let all bear in mind that a society is judged not so much by the standards attained by its more affluent and privileged members as by the quality of life which it is able to assure for its weakest members.
Code:
function versionCheck() {
var rv = -1;
if (navigator.appName == 'Microsoft Internet Explorer') {
var ua = navigator.userAgent;
var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
if (re.exec(ua) != null)
rv = parseFloat(RegExp.$1);
}
alert (rv);
if (rv == 7.0 || rv == 8.0)
alert("Minimum browser requirement is IE9. Please consider updating your browser, or check back later.");
}
Let all bear in mind that a society is judged not so much by the standards attained by its more affluent and privileged members as by the quality of life which it is able to assure for its weakest members.