Search the Community
Showing results for tags 'block ie website javascript'.
-
Hi, I'm creating a website for my college course as part of an assignment. Blocking IE isn't part of the assignment but my CSS document has percentages and for some reason the college uses a really old IE version so it completely messes up the website. What I was hoping to do is make it so all versions under and equal to 10 are blocked; IE 11 works well with my website. So overall I need a method of blocking IE version 10 and under without using PHP or .HTACCESS. What I need it to do is when the person requests the website with IE 10 and under that it returns a document named "reject.html" otherwise have it return index.html. I've done something like this last year with javascript but for some reason it's not working now? Please note that this isn't going to be a full blown website it's just a 3 page website but in order for the lectures to mark it correctly it must be on the correct browser. Help will be much appreciated. Here are the methods that I've tried so far. <script> /*@cc_on @if (@_jscript_version > 10) document.location.href = "reject.html"; @elif (@_jscript_version == 10) document.location.href = "index.html"; @elif (@_jscript_version == 9) document.location.href = "reject.html"; @elif (@_jscript_version == 5. document.location.href = "reject.html"; @elif (@_jscript_version == 5.7 && window.XMLHttpRequest) document.location.href = "reject.html"; @elif (@_jscript_version == 5.6 || (@_jscript_version == 5.7 && !window.XMLHttpRequest)) document.location.href = "reject.html"; @elif (@_jscript_version == 5.5) document.location.href = "reject.html"; @elif (@_jscript_version < 5.5) document.location.href = "reject.html"; @else document.location.href = "index.html"; @end @*/ </script> And <script language="javascript"> <!-- if (navigator.appName == "Microsoft Internet Explorer") { document.location = "reject.html"; } // --> </script>