470,863 Members | 1,063 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,863 developers. It's quick & easy.

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=popup("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???
Feb 15 '07 #1
2 1097
r035198x
13,262 8TB
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=popup("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?
Feb 15 '07 #2
dorinbogdan
839 Expert 512MB
For IExplorer you can use onmouseenter event, or write a function and set window.event.cancelBubble = true.
For other browsers, you should call event.stopPropagation() from within the event handler function.
Feb 16 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by c.anandkumar | last post: by
reply views Thread by guyarkam | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.