1

I am using ajax to fill in my select dropdown. I am using this widget to beautify my multiselect dropdown. But for some reason, the dropdown is not getting populated after using this widget. Here is my code. The app is using struts

<html:select styleId="code" name="Form" property="selCode" multiple="multiple"> 
 <logic:iterate id="clist" name="Form" property="CodeList">
  <option value=<bean:write name="cclist" property="id"/>>
  <bean:write name="cclist" property="value"/></option>
 </logic:iterate> 
</html:select>

$(document).ready(function(){
 $("#code").multiselect().multiselectfilter();;
});
dazzle
  • 1,346
  • 2
  • 17
  • 29
  • 2
    I read the documentation real fast, said you should call refresh when you load in ajax values, I don't see your ajax clal, but in the `success:function(){` part, just do `$('#chargecode').multiselect('refresh');` it looks like – Ohgodwhy Nov 08 '12 at 12:00
  • Where did you set id="chargecode"? I don't know how struts works, but seems that you are not setting it anywhere, so $("#chargecode") does not get an element to apply multiselect. – MaLKaV_eS Nov 08 '12 at 12:02
  • Thanks Ohgodwhy. You are a star! +1 for you – dazzle Nov 08 '12 at 12:23

0 Answers0