Click to See Complete Forum and Search --> : dropdown menu with struts


noslenwerd
11-11-2005, 03:05 PM
I am trying to code a dropdown menu with struts


<td><b><span style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">&nbsp;&nbsp; <SELECT NAME="TestingData">
<OPTION selected>Suburban</OPTION>
<OPTION >Urban</OPTION>
<OPTION >Rural</OPTION>
</SELECT> </span></b></p></td>

Theres the code i have (yes i usually use style sheets, but these forms were premade from a prior customer, and they just want it changed into struts without messing with the layout)... What would the coding be for struts with a dropdown? Is this right?

<td><b><span style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">&nbsp;&nbsp; <html:select NAME="TestingData">
<html:option>Suburban
<html:option>Urban
<html:option>Rural
</span></b></p></td>

thanks a bunch

Khalid Ali
11-13-2005, 12:58 AM
the above should work, only that there is no closing html:select tag(whihc will cause problem if not closed).
Second for the drop down boxes it gets a bit tricky if you want to populate the listbox dynamically from a source(such as in the result of a db query?)....let me know if thats the intent