WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 nextSibling, Kenneth Solberg, February 26, 2004
     Re:nextSibling , Brian R. James, February 27, 2004
     Re:nextSibling, Guilherme Blanco, February 27, 2004

Subject: Re:nextSibling From: Guilherme Blanco Date: February 27, 2004

Seems that the event disable the first nextSibling call.

I did this test case, and seems that for all tags, not only for UL, it returns undefined to you. But if you add another nextSibling (2 calls in the e HTML element), it returns you correctly the UL element.
Check out:

<html>
  <head>
    <title>Test NextSibling</title>
    <script type="text/javascript">
      document.onclick = va_nav;
      function va_nav(){ 
        var e = window.event.srcElement;
        alert(e.tagName);
        var s0 = e.nextSibling;
        alert(s0.tagName);
        var s1 = e.nextSibling.nextSibling;
        alert(s1.tagName);
        var s2 = s1.childNodes(0);
        alert(s2.tagName);
      }
    </script>
  </head>
 
  <body>
    <a href="#">Online Resources</a>
    <ul class="nav_lvl4">
      <li><a href="#">Accessories</a></li>
    </ul>
  </body>
</html>


Erik or any other guy will probably provide you the right info... I'm only helping you to correct your code.

Best regards,
Guilherme Blanco




Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX