A lot of people say that this is asked too much in the comments, which made me hesitant to ask this, but I still have not found a solution in their answers, mostly because (
You can also do this, but maybe it's not necessary:
function iClick(this)
{
var foo = "I would like to pass this.";
ajax.onreadystatechange = (function(thevar) {
return function () { alert(thevar); };
})(foo);
}