title: Adding a Value outside of the Auto Complete - jQuery Plugin: Tokenizing Autocomplete Text Entry
body: <p>I'm using the following JQUERY Autocomplete plug-in:
  <a href="http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/" rel="nofollow noreferrer">jQuery Plugin: Tokenizing Autocomplete Text Entry</a></p>
  
  <p>What'd I'm unable to figure out is how to add a value to the list from outside of the autocomplete dropdown list. </p>
  
  <p>The reason I want to do this is the autocomplete searches for locations, if a location is not found, there is an "ADD" modal dialog where users can add a location. After they add/submit the location I would like that new value to be automatically added to the autocomplete input.</p>
  
  <p>Here is the JS I'm trying to get to submit the new value to the autocomplete input: </p>
  
  <pre><code>$.TokenList.submitLocation.add_token_values("99", "Alpha");
  </code></pre>
  
  <p>Here's the JS that initiates the Autocomplete input:</p>
  
  <pre><code>$(function(){               
  $("#locationlist").tokenInput("/locations/autosuggest/", {
  hintText: "Type the location name",
  noResultsText: "No results",
  searchingText: "Searching...",
  callback: submit locationList
  })
  });
  </code></pre>
  
  <p>** I've found in jquery.tokeninput.js, the function add_token (item), but haven't been able to call it successfully.</p>
  
  <p>Ideas?</p>