Detect if IE7 & work around it? Help!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Head In A Pan
    New Member
    • Mar 2007
    • 25

    Detect if IE7 & work around it? Help!

    I'm trying to adapt an old piece of javascript to allow it to work with IE7 (which it wont... yet)

    At the start of my js there is a line of code:

    var ns = (navigator.appN ame.indexOf("Ne tscape") != -1);
    which detects if netscape & makes some sort of rule (I am new at this - bear with me)

    And in my searches for a IE7 equivalent I have found:
    ie7=(this.ver.i ndexOf("MSIE 7")>-1 && this.dom)?1:0;

    If this is the same sort of thing, how do I adapt it to my code?

    Any suggestions?
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Browser detection is not recommended, use object detection instead.

    See this link - it gives you want you want, but read the object detection link.

    Comment

    Working...