Use this
        <Select name="ddlserviceNo" >
                <%  while (resultsetService.next()) {
                String serviceNo=resultsetService.getString(1);
                if(request.getParameter("ddlserviceNo").equals(serviceNo))
                {
                        serviceName=resultsetService.getString(2);
                        System.out.println("Service nos:"+serviceNo);
                        %>
                        <option selected value="<%=serviceNo%>"><%=serviceNo%></option>
                <%}else{%>
                        <option value="<%=serviceNo%>"><%=serviceNo%></option>
                <%}}%>
        </Select>

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Eoin Shalloo
Sent: Wednesday, August 02, 2000 2:01 PM
To: [EMAIL PROTECTED]
Subject: Dynamic population of list box


Hi,

I need to be able to retrieve a list of employees' names from Oracle and
populate a list box with that data.

Retrieving the names and displaying them on a webpage as plain text is fine
. I am just not clear how to dynamically populate a list box  so that the
user may select one and then I can use the selected value to retrieve that
employee's information.

Can anyone point me in the right direction?

Regards,
Eoin.
~
"Ní hé lá na gaoithe lá na scolb"
T: +353 1 6710692
F: +353 1 6710863

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to