title: Detect change of value of struts2 autocompleter tag using javascript or jquery
body: <p>I am working on Struts 2 application. In my application, I need to use Struts 2 <code>autocompleter</code> tag. For that I have used <code>struts2-dojo-plugin-2.3.1.2.jar</code> jar file. I need to fetch the value from autocompleter once the value changes. I tried using <code>onchange</code> event but it was not working. Here is my code:</p>
  
  <pre class="lang-jsp prettyprint-override"><code>&lt;%@taglib uri="/struts-dojo-tags" prefix="sx"%&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;script type="text/javascript"&gt;
  function abc() {
      var a = dojo.widget.byId("country");
      var value1 = a.getSelectedValue();
      document.getElementById("myText").value = value1;
  }
  &lt;/script&gt;
  &lt;sx:head /&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;sx:autocompleter name="country"
  id="country" onchange="abc();" list="cricketNations" /&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>How do I achieve this. Help me solve this issue. </p>