<div onclick="AutogeneratedMethod()">
<span>SPAN 1 : I require auto method </span>
<span onclick="DesiredMethod()">SPAN 2 : I do not require auto method</span>
</div>
In the above code sample, how do I prevent calling the AutogeneratedMethod() when the user clicks on the SPAN 2? I do not have any control on the declaration of the div and its respective onclick behavior. That line is auto-generated from the framework I am using.
I'm looking for something that would kill Javascript execution at the end of the DesiredMethod(). Something like this:
function DesiredMethod() {
//Do necessary stuff
exit; //Abort any further Javascript
}