title: How to stop event propagation from within an anchor's href attribute without using onclick or onmousedown
body: <p>Due to restrictions, even though it is something i avoid altogether, in a certain situation i have to use the javascript: syntax in a href attribute of an achor tag.</p>
  
  <p><em>(EXPLANATION: In my CMS i use a rich text editor to allow the user to make changes to text elements, including links. In some cases specific javascript: calls are required and i banned onclick completely from the link editing features (to simplify the process for the user). However, as one of the links appears within a block that reacts to an onclick event, the thing double-fires)</em>  </p>
  
  <p>Like this:</p>
  
  <pre><code>&lt;a href="javascript:doSomething()"&gt;&lt;/a&gt;
  </code></pre>
  
  <p>My problem is that this link is inside a container that already reacts to an onclick event. Therefore i wanted to pass the event object along to the doSomething() method, so that i could then use jQuery's</p>
  
  <pre><code>event.stopPropagation()
  </code></pre>
  
  <p>method. </p>
  
  <p>Unfortunately however, it seems that passing the event object along</p>
  
  <pre><code>&lt;a href="javascript:doSomething(event)"&gt;&lt;/a&gt;
  </code></pre>
  
  <p>does not seem to work at all. Safari won't say anything while Firefox will report <em>ReferenceError: event is not defined</em></p>
  
  <p>I assume that this is the case because href="" is not a script-initiating attribute (such as onclick). The problem is that in this situation i won't be able to access the  tag beyond what i already do.</p>
  
  <p>Therefore i either need </p>
  
  <p>1.) A way to pass the event object to the doSomething() function from within the href attribute</p>
  
  <p>or</p>
  
  <p>2.) A way to stop the event propagation right in that anchor (after its clicked) by other means.</p>
  
  <p>Thank You for any constructive input!</p>