Dear Jeremy .. According to your code below, it seems that for the first time the jsp page load you're initialiaze the var variable into string "1". So the three object you've mention before automatically will not visible. try this and hope you can learn more .. Modify your jsp code <% String val = ""; if (request.getParameter("subscriptionType") != null) { val = request.getParameter("subscriptionType") ; } else { val = "1"; } %> then create the javascript function ChangeUrl(x). on your select tag call this function you do not need to modify another section of code .. hope this help .. Regards Irwan On 7/26/06, Jeremy Jardin wrote: > hum, > > I mean my jsp is built dynamically.. so when my select box is set to "1", > my jsp is made with 4 fields. > But if my select box is set to "2", "3" or "4". my JSP page is made with 3 > new fields. > > And I think that "hide" means present but not visible.. and "not display" > means not present in the page. > > I hope you'll understand, I'm sorry for my poor english. > > > SO, have a look at my jsp, it could be more comprehensive: > > styleClass="form" onchange="ChangeUrl(this.form)"> > > > > > > > > <% String val = new String("1") ; %> > > property="subscriptionType" value="<%=val%>"> > > styleId="nomentreprise" styleClass="form" size="20" value=""/> > styleId="representant" styleClass="form" size="20" > styleClass="form2" size="10" maxlength="14" value="" /> > > > > I just want those 3 fields (enterpriseName, legalRepresentant and siren) to > be required if select box != 1. > > > ?? --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org