Javascript

Script to detect IE version

<script type=”text/javascript”> if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x; var ieversion=new Number(RegExp.$1) // capture x.x portion and store as a number if (ieversion < 7) { alert(“You’re using older version of ie appgarde to ie8 or above ie8”); location.href(‘http://www.microsoft.com/downloads/info.aspx?na=41&srcfamilyid=341c2ad5-8c3d-4347-8c03-08cdecd8852b&srcdisplaylang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2fC%2fC%2f0%2fCC0BD555-33DD-411E-936B-73AC6F95AE11%2fIE8-WindowsXP-x86-ENU.exe’); } } else document.write(“n/a”) </script>