whats wrong with this JS?
<p>There is any interesting <a href="http://www.fitzblog.com/2007/08/nine-javascript-gotchas" rel="nofollow">article</a> which warns about JS problems.</p>

<p>However, notice #2:</p>

<pre><code>&lt;input type="button" value="Gotcha!" id="MyButton" &gt;
&lt;script&gt;
var MyObject = function () {
    this.alertMessage = "Javascript rules";
    this.ClickHandler = function() {
          alert(this.alertMessage );
      }
}();

&lt;/script&gt;
</code></pre>

<p>Notice the self executing function by <code>()</code> at the end. However I'm pretty sure the <code>this.xxx</code> is used when doing <code>new MyObject()</code>. He wrote :</p>

<blockquote>
  <p>If you call <code>MyObject.ClickHandler();</code> you will get a popup saying "Javascript rules".</p>
</blockquote>

<p>and his sample doesn't work. I've tried <code>MyObject.ClickHandler()</code> and got an error...(Cannot call method 'ClickHandler' of undefined)</p>

<p>How can I make <code>MyObject.ClickHandler()</code> work ?  </p>
