I tried to search something similar but I failed, so, I’m asking here
this is a piece of my code:
<div id="ui-widget">
<label>Doc Type: </label>
<select id="classes" onchange="createForm()">
<option value=" ">Select a type ... </option>
<#list typenames?keys as key>
<#if typenames[key]!="">
<option value="${key}">${typenames[key]}</option>
</#if>
</#list>
</select>
</div>
the select tag is using this jQuery:
http://jqueryui.com/demos/autocomplete/#combobox
with autocomplete;
The function createForm() is a Javascript that creates different form depending on which selection you make in the select tag;
But using autocomplete from jQuery, the onchange event in the select tag seems not working.
Is there a method to inject some JavaScript code like my function to work on selection change of this jQuery?
Use the following to bind the
autocompleteselectevent for the autocomplete :or
or
Docs are here