title: how to javascript onmousedown event emulation
body: <p>How to emulate an mousedown event using javascript?
  See, i got a link on a page smth like this:</p>
  
  <pre><code>&lt;a class="boo" target="_blank" onmousedown="function_rc()" href="http://www.siteaddress.com" tabindex="2"&gt;&lt;/a&gt;
  </code></pre>
  
  <p>and i have to dispatch onmousedown event in a programm way, after user makes some actions.
  for an example i tried this:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script type="text/javascript"&gt;
  function showChar()
  {
  alert('mouse down');
  }
  function fake()
  {
  var evt = document.createEvent('MouseEvents');
  evt.initMouseEvent ('mousedown', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
  document.getelementbyid('my_link').dispatchEvent(evt);
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;a id="my_link" onmousedown="showChar()" &gt;LLL&lt;/a&gt;
  &lt;div id="alert" onclick="fake()"&gt;Click me!&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>if i understand it correctly - when i click on div with id="alert" function start working, create an MouseEvent evt type=mousedown and dispatc this event on a with id="my_link". So after the evt is dispatched function showChar() should start. 
  but it doesn't happen.
  who knows why and how to solve this situation?</p>