title: How can I prevent link behavior on clicking an image inside an anchor element?
body: <p>I have a code similar to this:</p>
  
  <pre><code>&lt;a href='link.html'&gt;goto link page &lt;img src='images/edit.gif' alt='Dont Go, just edit' onclick='doEdit()'&gt;&lt;/a&gt;
  </code></pre>
  
  <p>Now I want the href link to work as normal if you click on the text, but if you click on the image, it should do something else and not goto the link at all.</p>
  
  <p>There is also a restriction, I cannot edit the link or its text, the only thing that I have total control over is the img tag and its called onclick function. So I have to prevent the link from going on from within that img tag.</p>
  
  <p>Any help will be appreciated.</p>