Ask Experts Questions for FREE Help !
    Amit_Patil's Avatar
    Amit_Patil Posts: 1, Reputation: 1
    New Member

    Jun 4, 2010, 12:19 AM
    MySQL query has to display in dropdown button in jsp
    MySQL query result has to display in drop-down button in jsp.
    dandemeyere's Avatar
    dandemeyere Posts: 50, Reputation: 3
    Junior Member

    Aug 3, 2010, 04:20 PM
    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.
    <!-- 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 -->

Not your question? Ask your question View similar questions


Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.

Check out some similar questions!

No dropdown Menu [ 1 Answers ]

I have IE 8.0 on My Laptop, I can access few sites normally however on few of the sites thereis no Drop down Menu. It comes Blank which I know is there if I access it throough some other PC through the same Network I have. Moreover I have downloaded Java Latest version today and tried to access the...

Display data in next jsp page [ 1 Answers ]

I want to display a set of data in a jsp page . On one jsp page , I select one date This date is present in a form, and it is passed onto a servlet file from where, a database query is accessed This query compares the date entered by user, and that date present in a database table Then, selects...

Jsp [ 1 Answers ]

Hi pals I would like to know about JSP programs,how to use JSP programs etc , not the subject ,can anyone help me...

Address bar's dropdown box [ 1 Answers ]

When I visit some websites, they store their url in my address bar's dropdown menu. How can I make this happen for my own sites? Thanks: Darrel

View more questions Search