MySQL query result has to display in drop-down button in jsp.
MySQL query result has to display in drop-down button in jsp.
Well I'm not sure about the actual JSP code used to do this. But when you retrieve your MySQL result and store it in an array, iterate through the array and at every instance, create a new drop-down item.
Pseduocode:
Code:<select>
<!-- JSP code starts here -->
arrReturn = query(result);
for(int i=0; i < arrReturn.length(); i++) {
echo '<option value="' . i . '">' . arrReturn[i] . '</option>';
}
<!-- End JSP code -->
</select>
All times are GMT -7. The time now is 10:55 AM. |