title: Sending extra pram to jquery autocomplete
body: <p>I have a two field market select option and company input box.</p>
  
  <p>Currently I am taking a market value and putting it into the session and calling the search company for autocomplete.</p>
  
  <pre><code>    // set market in session for searchCompnay
      sessionStorage.strategy_market = $("#market").val();
      $("#market").change(function() {
          sessionStorage.market = $("#market").val();
      });
      $("#symbol").autocomplete({source: searchCompany, minLength: 2 });
  </code></pre>
  
  <p>Search Company:</p>
  
  <pre><code>//function for searching companies
  function searchCompany(request, response){
      var searchString = request.term;
      var callback =  function(status, jsondata){
          var availableTags = [];
          for(var i=0;i&lt;jsondata.length;i++){
              var company = jsondata[i];
              availableTags.push(company.name);
          }
          response(availableTags);
      };
      callback.loadingDivId = "loadingDiv";
      SY.searchCompany(callback,sessionStorage.market,searchString,true);
  }
  </code></pre>
  
  <p>I don't think setting session for sending market name for searching company is a good idea. Can any one suggest me a better way to do this.</p>
  
  <p>P.s. I am using autocomplete searchCompany in many parts of my application.</p>