I have the following code which is trying to stop propagation, works every where but not in IE. May I know the reason?
<input type="button" name="Done" value="Done" onclick="var ev= args[0]? args[0]:window.event;clickedDone(ev)"/>
<script type="text/javascript">
var clickedDone = function(ev) {
if(ev.cancelBubble) {
ev.cancelBubble = true;
}
if(ev.stopPropagation) {
ev.stopPropagation();
}
//do some work over here
}
}
</script>
Got the answer event.cancelBubble is false in IE and checking for its existence in the code which wont make event.cancelBubble true and thus bubbling up.