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 6 of 6
  1. #1
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Netscape problem with addEventListener

    I think...

    Here's my page and you can go here to view the source and js.

    Now, the problem? Well, for some reason, it doesn't seem like the event is being attached, because it never fires...

    Any clues? Did I misspell somthing?
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hmm... that DOM browser looks familiar.....
    Last edited by Vladdy; 11-13-2002 at 01:18 AM.
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    function toggleDisp(subHead, subMenu) 
    {
        if (is.ie)And what if not???
            if ((is.ie && subMenu.currentStyle.display == 'none') || (is.gecko && (subMenu.style.display == 'none' || subMenu.style.display == ''))) {
                subMenu.style.display = 'block';
                subHead.style.listStyleImage = "url(../images/nav_arrow_dn.gif)";
                subHead.setAttribute("title","Click to hide");
                }
            else {
                subMenu.style.display = 'none';
                subHead.style.listStyleImage = "url(../images/nav_arrow.gif)";
                subHead.setAttribute("title","Click to expand");
                }
    }
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

  • #4
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts


    Thanks
    Last edited by beetle; 11-13-2002 at 02:25 AM.
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”

  • #5
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oh, I almost forgot. Total homage to your DOM browser. It is one of my favorite tools.

    Remember...


    hehe
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”

  • #6
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, just FYI for Vladdy and those that observe....although the line Vladdy indicated to me certainly would cause a problem, there was a mixup someplace else. The problem was related to the fact the Gecko includes many textNodes that IE doesn't, and more importantly, that Gecko will register events fired from a textNode. I had to add the red-line below to circumvent this.
    Code:
    function toggleMenu(e) {
    	if (is.ie) e = window.event;
    	e.cancelBubble = true;
    	var li = (is.ie) ? e.srcElement : e.target;
    	if (li.nodeType == 3) li = li.parentNode;
    	var ul = getSubMenu(li);
    	toggleDisp(li, ul);
    	}
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”


  •  

    Posting Permissions

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