title: How to pass onComplete a variable containing a function name for Ajax class
body: <p>Mootools Ajax class has a onComplete parameter whereby you can pass a function name to it and it would call that function when it completes (obvious).</p>
  
  <p><a href="http://docs111.mootools.net/Remote/Ajax.js" rel="nofollow">http://docs111.mootools.net/Remote/Ajax.js</a></p>
  
  <p>I want to be able to pass a variable containing the said function instead. How do I go about doing that? My attempt can be seen below.</p>
  
  <pre><code>/*
   * This way works
   */     
  var TestClass = new Class({
  
      myRequest: function()
      {
  
          $aj = new Ajax(urle, {
  
            method: 'get',
            update: $('update_div'),
            onComplete: this.testFunctionA
  
          }).request();
  
      },
  
      testFunctionA: function()
      {
          alert('Yo');
      }
  
  });
  
  /*
   * This way doesn't 
   */     
  var TestClass = new Class({
  
      myRequest: function()
      {
  
          var updateFunction = 'this.testFunctionA'; 
  
          $aj = new Ajax(urle, {
  
            method: 'get',
            update: $('update_div'),
            onComplete: updateFunction
  
          }).request();
  
      },
  
      testFunctionA: function()
      {
          alert('Yo');
      }
  
  });
  </code></pre>