title: Capture onClick of a Codemirror textbox
body: <p>I'd need a little help with Codemirror. What I'd like to do is when I click into a textbox, I want to get its ID.</p>
  
  <p>With a pure HTML textbox it works, I can get the ID of the textarea. See code here: <a href="http://jsfiddle.net/aWAQY/" rel="nofollow">http://jsfiddle.net/aWAQY/</a></p>
  
  <pre><code>&lt;form name="x" enctype="multipart/form-data" action="#" method="POST"&gt;
  &lt;textarea id="testextarea" name="testextarea" onClick="getname();"&gt;&lt;/textarea&gt;
  &lt;/form&gt;
  &lt;script&gt;
  function getname() {
  var tname = document.getElementById('testextarea').name;
  alert(tname);
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>But if I call the getname() function on a CodeMirror textbox via onClick, nothing happens. Actually not even an onClick="alert('hello world');" pops up.</p>
  
  <p>Is there any other, specific way how I can get the ID of a CM textarea and/or make onClick work?</p>
  
  <p>Thanks!</p>