By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,663 Members | 1,304 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,663 IT Pros & Developers. It's quick & easy.

Events in enclosed tags

P: 16
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
Share this Question
Share on Google+
2 Replies

10K+
P: 13,262
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
Expert 100+
P: 839
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.