Let\'s say I have an element with an onclick event, and another element inside it, how do I disable the onclick for the child element?
Example:
Javascript events are propagated bottom-up, i.e if you click on a button, all ascendants recieve the onclick event in orderly fashion, except for when one of them intercepts it via stopPropagation (or returns true, meaning i handled this)
Example :
text
you could also bind onclick of parent to a function :
function onlick_handler(e)
{
e.stopPropagation(); //this event would propagate to parents of this object which are clicked as well
// the rest here
}