RBS
asked on
Filter out older IE Browsers Problem
Hi:
I have an online course and am trying to prevent people with older IE browsers from ordering it.
I have the following:
I find that all this does is make the Order Courses menu item invisible on IE 10 and IE11.
Any suggestions greatly appreciated.
RBS
I have an online course and am trying to prevent people with older IE browsers from ordering it.
I have the following:
<!--[if gt IE 8]>
@Html.MenuLink("Order Courses", "OrderCourses", "Register")
<![endif]-->
I find that all this does is make the Order Courses menu item invisible on IE 10 and IE11.
Any suggestions greatly appreciated.
RBS
'gt' means 'greater than'. Try 'lt' which means 'less than'.
ASKER
No, the gt is correct. I have an earlier bit of code that shows the the following message if the browser is less than IE 9:
This code works fine. I guess the problem with using gt is that while IE browsers may recognize the rule, all others see this block of code as a comment and so ignore it.
My problem is that I want all browsers to see the Order link except those that are IE and below 9
RBS
<!--[if lt IE 9]>
<div class="lowBrowserMessage">
<div class="ie-lowerthan9">HDCOElearning.com requires Internet Explorer 9 or greater</div>
<![endif]-->
This code works fine. I guess the problem with using gt is that while IE browsers may recognize the rule, all others see this block of code as a comment and so ignore it.
My problem is that I want all browsers to see the Order link except those that are IE and below 9
RBS
That is correct. Only IE will read either of those as a conditional directive. All other browsers see it Only as a comment.
ASKER
Can you suggest any way that I can make it so that any browser other than id browsers below 9 can see the Order Link?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I guess I will have to look at another method other than Conditional Comments - just wondering if you had any suggestions.
Nothing easy. The standard javascript methods don't report the info you're looking for. This site lists the "User-Agent" strings for many browsers: http://www.useragentstring.com/pages/useragentstring.php
ASKER
Thanks Dave
RBS
RBS