java - JSP drop down list to select first option by default on page load using struts -
hope can me out on this.
i've got following drop down list in jsp:
<html:select styleid="facilityid" property="facilityid"> <html:options collection="<%=session.consumer_facility%>" property="id" labelproperty="facilitydescription" /> </html:select> that gets collection of list displayed in drop down java class perfectly.
but when open page shows drop down list, how can make first option selected default on page load, without clicking , selecting option?
can inside jsp code or javascript can that?
i'm using struts.
hope makes sense i'm looking for.
set facilityid value expected default during actionform initialization.
guess you're using struts 1.x
Comments
Post a Comment