I have iFrame in my main html file and I'm loading a sub html in that iFrame. Sub HTML has some functions like on click of anchor tag I'm calling a function and that function is loading some page. Now in my main iFrame when I click that anchor tag of sub HTML, I want to override that function, instead of loading I want to embed some file. Right now both main html and sub html on click both are working. When I checked the event listener I saw main html click is first and then sub HTML click function. In that case how can I override it? I have tried e.preventDefault() , e.stopImmediatePropagation();
reproduceyour problem. As I can see you are new here... Then provide a little code and let us see how many minutes it will take to propose one OR more solutons