...

View Full Version : event handlers



raghu207
08-27-2007, 04:43 PM
Hi all..

Here's my problem:
I am creating two divs through javascript - one nested within the other.
<div>
<div>
</div>
</div>

I have attached an event handler only to the nested div, but upon closer inspection I find the event to be propogating to the top div as well.
I have only one event handler for the nested div and I have cancelled bubbling using the e.stopPropogation() and e.cancelBubble.

How is my event handler being called for the top div even though I'm not asking it to? What have i missed here? :confused:

Thanks in advance!
raghu207



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum