Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Drop Down Menu Not Working in Internet Explorer

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #37436
    zkirshner
    Member

    I have been asked to figure out why the drop-down menu under “Our Menu” on the site http://barbara-company.com/ is not working in Internet Explorer, and fix it. I’m having trouble figuring it out, short of building a new menu entirely, and would greatly appreciate any help!

    #100395
    Mottie
    Member

    Hi zkirshner!

    Well, I have to say even though the site doesn’t look too bad, it really needs to be brought up-to-date. According to W3C Validation service, which in my opinion doesn’t need 100% compliance, shows 41 errors.

    To be honest, a majority of designers would look at that site and cringe. And I, leaning a bit more toward development, have cringed from both the code and design.

    That being said, the fix is actually quick and simple, but you will need a text editor and a way to update a file that is online.

    In the mm_menu.js file, look for this bit of code which is located at line 559:

    if (typeof(l) == "string") l = FIND(l);

    Now change it to this by adding a “[0]” on the end:

    if (typeof(l) == "string") l = FIND(l)[0];
    #100635
    zkirshner
    Member

    Hi, Mottie!

    While I’m not as experienced as you, I can certainly agree that the design of this site could benefit from an update, and the code is somewhat dismal, haha. Alas, the job at hand is to simply fix that drop-down!

    So, I added a [0] to that line of javascript, but it didn’t fix the issue in IE, and actually broke the drop-down in [at least] Chrome. I’m learning javascript, but don’t have enough experience yet to know exactly what’s going on in that chunk of code. Do you have any other ideas?

    Thanks so much for your help, Mottie!

    #100640
    Mottie
    Member

    DOH, I apologize, I was so focused on getting it to work in IE, I forgot about other browsers. So instead of adding the [0] on the end, add this line after the above mentioned line:

    if (typeof(l) == "string") l = FIND(l);
    l = l[0] ? l[0] : l;

    I was also wrong about the line numbering because of I added a couple of lines for testing, so it should be line 556.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.