I usually set the JavaScript add-options statements using logic-iterate and on the event of user clicks a button; this function will be called which will populate the select box.
function refreshSelect() { <logic:iterate id="MIP_SUBGRP_CD" name="MIP_SUBGRP_CD"> document.forms[0].eligMipSubgrpCd.options[<%=y%>] = new Option('<bean:write name="MIP_SUBGRP_CD" property="description"/>','<bean:write name="MIP_SUBGRP_CD" property="code"/>'); <%y++;%> </logic:iterate> } You can try this. But avoid using forms[0] or the scriptlets in logic tags(though it works fine) Make sure that the select is populated correctly and don't forget to select some item[s] before submits the form. Bala -----Original Message----- From: lk [mailto:[EMAIL PROTECTED] Sent: Monday, July 11, 2005 9:55 AM To: user@struts.apache.org Subject: Problem with html:select Hi, I have a <html:select> that at begin is empty. Using a javascript and clicking over a button the select field can be populated? The problem is that if I try to read in my Action class the "select" it seems to be empty. (I use (ArrayList)((DynaValidatorForm)form).get("chosen") to get the ArrayList that should contain the list of chosen items) The field is declared in my struts-config.xml as a DynaActionForm field. What could be the problem? Thanks LuKe -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Prestiti Online. Scopri subito se sei finanziabile. in 24 ore senza spese né anticipi, clicca qui * Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2908&d=11-7 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]