Javascript: How to call this.Something() from this.img.onload = SomeLoadFunction;
<p>Ok I have some code similar to this...</p>

<pre><code>Thing function () {    
  var img = new Image;    
  DoSomeStuff function() {    
  //Some stuff here that can't be done until my img is loaded...    
};

InitMe function(src) {    
  this.img.onLoad = this.DoSomeStuff;     
  this.img.src = src;    
};    
}

var Test = new Thing();    
Test.InitMe("some string");
</code></pre>

<p>Which obviously doesn't work because <code>this.DoSomeStuff</code> stops being <code>Thing.DoSomeStuff</code> and becomes <code>img.DoSomeStuff</code></p>

<p>So I guess what I need to know is, how can I call the <code>Thing.DoSomeStuff()</code> function from the <code>img.onLoad</code>....</p>
