Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Fay
    Fay is offline
    New to the CF scene
    Join Date
    Jul 2011
    Location
    Melbourne
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Hide javascript menu from IE9?

    I do not understand javascript at all. For about eight years I've had a UDM javascript menu on each of about 200 pages. It consists of a bunch of files that live in the top of my website and are called to each page by four lines of script. I have had only to edit appearance and links in one file. Instructions were to leave the others alone.
    The present version of the UDM menu is not free, as the old one was, and if I did buy it I'm not at all sure I'd be able to cope with it. Unless the names of the new files matched those of the old ones, I'd have to go in and edit each page individually.
    My problem is that IE9 doesn't display the menu, but does display its background, so there's a big beige block on the top left of every page. It looks bad.
    Would I be able to add to one of the files something like a conditional comment such as "If IE9 display none"?
    I would be truly grateful for any ideas that would help me fix this.
    My site is http://fay.iniminimo.com/
    Thank you so much for your interest.
    Fay

  • #2
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,373
    Thanks
    11
    Thanked 592 Times in 572 Posts
    ie9 is not really ie, so you need to change the sniffer.

    in sniffer.js, modify as follows:

    change:
    Code:
    } else if (typeof document.all != "undefined" && !kde) {
    	exclude = 0;
    	ie = 1;

    to:
    Code:
    } else if ("\v"=="v" && !kde) {
    	exclude = 0;
    	ie = 1;
    this should cause ie9 (which fixes IE's historical "\v" uniqueness) to show up as something besides IE, though i didn't examine how the script handles unknowns...
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/9/03) IE7:0.1, IE8:4.6, IE11:9.1, IE9:3.1, IE10:3.0, FF:17.2, CH:46, SF:11.4, NON-MOUSE:38%

  • Users who have thanked rnd me for this post:

    Fay (07-13-2011)

  • #3
    Fay
    Fay is offline
    New to the CF scene
    Join Date
    Jul 2011
    Location
    Melbourne
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Smile Thank you

    Thank you so much, rnd me.
    I haven't seen the result yet, because the testing site predicts a 50 minute wait, but I do feel confident.
    I really am grateful to you for taking the time.
    Fay

  • #4
    Fay
    Fay is offline
    New to the CF scene
    Join Date
    Jul 2011
    Location
    Melbourne
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks. That looks much tidier.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •