If you write a fair bit of OO javascript and also utilise AJAX through one of the many frameworks (I personally use prototype.js most of the time) you may have come across the following issue:

var myobj = new Object();

myobj.Methods = {
    result: 0,
    callAjax: function() {
        new Ajax.Request('ajax.php', {
            onComplete: function(transport) {
                this.result = transport.responseText.evalJSON();
            }
        }
    }
};

Object.extend(myobj, myobj.Methods);

The problem with the above is that when you make the Ajax.Request() call and instigate a function call in the onComplete hook, this is no longer a reference to your original object. You have to change the line above to:

myobj.result = transport.responseText.evalJSON();

This way you are referencing the globally scoped myobj object and can make changes to its properties from within your anonymous function.