Loading ...
Sorry, an error occurred while loading the content.

Problem in MenuItem.init() when there is no text in MenuItem

Expand Messages
  • stergios_marinopoulos
    The menu markup below will cause MenuItem.init() to fail at line 4598 in menu.js (0.12.2) in IE 6 SP2. FireFox works just fine. Here is the line from menu.js
    Message 1 of 1 , Feb 1, 2007
    • 0 Attachment
      The menu markup below will cause MenuItem.init() to fail
      at line 4598 in menu.js (0.12.2) in IE 6 SP2. FireFox works just fine.

      Here is the line from menu.js :

      var oRange = oAnchor.ownerDocument.createRange();

      The problem is due to there being no text in my markup in the <LI> and
      <A> (i.e. I only have an IMG), and so createRange() fails.

      To make IE to work, I need only insert some text inside the anchor,
      for example:
      ...." />INSERTED TEXT HERE</a></li>"

      (But of course I do not want text... just an image)

      I have a created a minimal file demonstrating IE's failure. Please
      let me know if this is of use to you and I will forward it.


      <div id="carChallengeMenu" class="yuimenu">
      <div class="bd">
      <h6 class="first-of-type">Challenge</h6>
      <ul class="first-of-type">
      <li id="cc1" class="yuimenuitem first-of-type"><a ref="#"><img
      class="challenge" id="botPic" src="" /></a></li>
      </ul>
      <ul>
      <li id="cc2" class="yuimenuitem first-of-type"><a href="#"><img
      class="challenge" id="botPic" src="" /></a></li>
      </ul>
      </div>
      </div>


      Thanks,

      Stergios Marinopoulos
    Your message has been successfully submitted and would be delivered to recipients shortly.