title: JavaScript "this" references wrong object
body: <p>Well, <code>this</code> doesn't really refer to the <em>wrong</em> object, but I do not know how to refer to the correct one.</p>
  <pre><code>function someObj() {
     this.someMethod1 = function() {
        var elementBtn = document.getElementById('myBtn');
        elementBtn.onclick = function() { 
           this.someMethod2(); //I want this.someMethod2() to be called
           //...but it tries to call elementBtn.someMethod2() i believe.
        };
     };
     this.someMethod2 = function() {
        alert('OK');
     };
  }
  </code></pre>
  <p>So when my <code>myBtn</code> is clicked I want <code>someObj.someMethod2()</code> to run. And I want it to be that <code>someObj</code>, not <em>any other</em> <code>someObj</code>. But how?!</p>