Revision: 3743
Updated Code
at September 9, 2007 20:43 by arunpjohny
Updated Code
isMac = (navigator.appVersion.indexOf(â€Macâ€)!=-1) ? true : false; NS4 = (document.layers) ? true : false; IEmac = ((document.all)&&(isMac)) ? true : false; IE4plus = (document.all) ? true : false; IE4 = ((document.all)&&(navigator.appVersion.indexOf(â€MSIE 4.â€)!=-1)) ? true : false; IE5 = ((document.all)&&(navigator.appVersion.indexOf(â€MSIE 5.â€)!=-1)) ? true : false; IE6 = ((document.all)&&(navigator.appVersion.indexOf(â€MSIE 6.â€)!=-1)) ? true : false; IE7 = ((document.all)&&(navigator.appVersion.indexOf(â€MSIE 7.â€)!=-1)) ? true : false; ver4 = (NS4 || IE4plus) ? true : false; NS6 = (!document.layers) && (navigator.userAgent.indexOf(’Netscape’)!=-1)?true:false; /* * We can also use */ # if (typeof document.body.style.maxHeight != "undefined") { # // IE 7, mozilla, safari, opera 9 # } else { # // IE6, older browsers # } //or if (window.XMLHttpRequest) { // IE 7, mozilla, safari, opera 9 } else { // IE6, older browsers }
Revision: 3742
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at September 9, 2007 20:32 by arunpjohny
Initial Code
isMac = (navigator.appVersion.indexOf(â€Macâ€)!=-1) ? true : false; NS4 = (document.layers) ? true : false; IEmac = ((document.all)&&(isMac)) ? true : false; IE4plus = (document.all) ? true : false; IE4 = ((document.all)&&(navigator.appVersion.indexOf(â€MSIE 4.â€)!=-1)) ? true : false; IE5 = ((document.all)&&(navigator.appVersion.indexOf(â€MSIE 5.â€)!=-1)) ? true : false; IE6 = ((document.all)&&(navigator.appVersion.indexOf(â€MSIE 6.â€)!=-1)) ? true : false; IE7 = ((document.all)&&(navigator.appVersion.indexOf(â€MSIE 7.â€)!=-1)) ? true : false; ver4 = (NS4 || IE4plus) ? true : false; NS6 = (!document.layers) && (navigator.userAgent.indexOf(’Netscape’)!=-1)?true:false;
Initial URL
Initial Description
Initial Title
Detecting Browser Version
Initial Tags
javascript
Initial Language
JavaScript