Declaring variables using the keyword this in js
<p>Is there a difference between this:</p>

<pre><code>var onClick = function() {

     var image = .....

     $.post("/..../...", null, function(data) { myCallback(data, image); } );
}
</code></pre>

<p>and</p>

<pre><code>var onClick = function() {

     this.image = .....

     $.post("/..../...", null, function(data) { myCallback(data, this.image); } );
}
</code></pre>

<p>I am using the 'this' way, and for some reason any parameter I pass into myCallback is null??</p>

<p>If I output the variable before the $.post call using alert, I get a value so its not null?</p>
