title: how to get jQuery autocomplete extraParam to evaluate current value
body: <p>I am having the same issue as described here - <a href="http://blog.qumsieh.ca/2009/09/08/jquery-autocomplete-extraparams-and-checkboxes/" rel="nofollow">http://blog.qumsieh.ca/2009/09/08/jquery-autocomplete-extraparams-and-checkboxes/</a></p>
  
  <p>In short, when using autocomplete, I am getting the initial value of the variable for the area select box.  Unlike the example above, however, the value of the parameter actually becomes the text of the function, rather than the evaluated value of the function.</p>
  
  <p>So instead of getting "option2", for example, I am getting "function(){return$('#area :selected').val();}'</p>
  
  <p>Here is my code:</p>
  
  <pre><code>$().ready(function() {$("#course").autocomplete("autoCompleteMain.php", {
          width: 360,
          matchContains: true,
          selectFirst: false,
          extraParams: {
              dateran : $('#dateran').val(),
              area1 : function (){
                  return $('#area :selected').val();
              }
  
          }
      });
  });
  </code></pre>