Events in enclosed tags

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Beginner1
    New Member
    • Feb 2007
    • 16

    Events in enclosed tags

    Hi,

    I have an popup menu on mouesover and mouseout for table <td> tag. It was working OK while I didn't add a link in this <td>. Now I have problems.

    It seems that event is sent for both for td and link.

    <code>
    <td onmouseover=pop up("Some text"); onmouseout=exit ();>
    <a>MY LINK</a>
    </td>

    When my mouse is over <td> popup() works, if it moves over link (in same td) exit works and then again popup. My Problem is that sometimes the exit() function works before popup() and I the popup window is stuked.

    Can you help me to get over this???
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by Beginner1
    Hi,

    I have an popup menu on mouesover and mouseout for table <td> tag. It was working OK while I didn't add a link in this <td>. Now I have problems.

    It seems that event is sent for both for td and link.

    <code>
    <td onmouseover=pop up("Some text"); onmouseout=exit ();>
    <a>MY LINK</a>
    </td>

    When my mouse is over <td> popup() works, if it moves over link (in same td) exit works and then again popup. My Problem is that sometimes the exit() function works before popup() and I the popup window is stuked.

    Can you help me to get over this???
    Why don't you try putting the onmouseover in the <a> tag instead?

    Comment

    • dorinbogdan
      Recognized Expert Contributor
      • Feb 2007
      • 839

      #3
      For IExplorer you can use onmouseenter event, or write a function and set window.event.ca ncelBubble = true.
      For other browsers, you should call event.stopPropa gation() from within the event handler function.

      Comment

      Working...