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:

<!--[if gt IE 8]>
                @Html.MenuLink("Order Courses", "OrderCourses", "Register")
  <![endif]-->

Open in new window


I find that all this does is make the Order Courses menu item invisible on IE 10 and IE11.

Any suggestions greatly appreciated.

RBS
RBSAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Dave BaldwinConnect With a Mentor Fixer of ProblemsCommented:
I'm not sure what you mean.  "Conditional comments" have been dropped as of IE10 so they are no longer useful.  http://msdn.microsoft.com/en-us/library/ie/hh801214%28v=vs.85%29.aspx
0
 
Dave BaldwinFixer of ProblemsCommented:
'gt' means 'greater than'.  Try 'lt' which means 'less than'.
0
 
RBSAuthor Commented:
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:

<!--[if lt IE 9]>
        <div class="lowBrowserMessage">
            <div class="ie-lowerthan9">HDCOElearning.com requires Internet Explorer 9 or greater</div>
<![endif]-->

Open in new window


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
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Dave BaldwinFixer of ProblemsCommented:
That is correct.  Only IE will read either of those as a conditional directive.  All other browsers see it Only as a comment.
0
 
RBSAuthor Commented:
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?
0
 
RBSAuthor Commented:
I guess I will have to look at another method other than Conditional Comments - just wondering if you had any suggestions.
0
 
Dave BaldwinFixer of ProblemsCommented:
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
0
 
RBSAuthor Commented:
Thanks Dave

RBS
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.