Hi,
Is there a difference between this:
var onClick = function() {
var image = .....
$.post("/..../...", null, function(data) { myCallback(data, image); } );
}
and
var onClick = function() {
this.image = .....
$.post("/..../...", null, function(data) { myCallback(data, this.image); } );
}
I am using the 'this' way, and for some reason any parameter I pass into myCallback is null??
If I output the variable before the $.post call using alert, I get a value so its not null?