How to retrieve data by using combo box value in jsp?

How to retrieve data by using combo box value in jsp?

I am using a single jsp form.. i did not get from another form.. i do not use 2 jsp form.. all are satisfaction in this form.. What will i do. My code is following there...


<select select name="productid">




<%

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:Airworld");
query=con.prepareStatement("select * from Productdetails where productid='?'");


rs=query.executeQuery();
while(rs.next())
{
pid=rs.getString(1);


%>

<option><% out.println(pid); %></option> /// Here stored Combobox values from database.



<%
System.out.println("Product Id=" +pid);

}

rs.close();
query.close();
%>


</select>

</td>
<%



productid=pid;

query=con.prepareStatement("select * from Productdetails where productid="+"'"+productid+"'");


rs=query.executeQuery();

while(rs.next())
{
pname =rs.getString(2); // Here i am not store product name into text box.
}

%>

<td width="541"><input type="text" width="525" name="productname" value="<% out.println(pname);%>" /></td>


Note: I am using only this jsp form.. i do not use to get values from another form...
View Answers









Related Tutorials/Questions & Answers:
How to retrieve data by using combo box value in jsp? - JSP-Servlet
How to retrieve data by using combo box value in jsp? - JSP-Servlet
Advertisements
How to retrieve data using combo box value in jsp? - JSP-Servlet
How to retrieve data by using combo box value in jsp? - JSP-Servlet
How to retrieve data from database by using combo box value in jsp? - JSP-Servlet
How to retreive data by using combo box value - JSP-Servlet
retrieve the data to text fields from database on clicking the value of combo box
How to retreive data by using combo box value - JSP-Servlet
Populate a combo box using data from a database
how to retrieve data from database using combobox value without using request.getParameter in jsp - JSP-Servlet
how to get combo box value - JSP-Servlet
how i conditional access the data from database using combo box. - JSP-Servlet
Acees data from database using combo box - JSP-Servlet
How to pass the value of Selected Value of combo box into sql ??
Retrieving data from data base using jsp combo box
how can retrive value from combo box in servlet?
combo box value
combo box value
How to Retrieve Data from Facebook Using PHP
How to Retrieve Data from Facebook Using PHP
How to create textbox on combo value selection using javacsript in jsp?
Combo box value Error - WebSevices
how to retrieve data into combo from database in java applet?
Retrieving Data from Database to fill Combo Box
base the value of first combo box, how i display the second combox - JSP-Servlet
loading value into combo box by selecting value from other combo box - JSP-Servlet
Re: base the value of first combo box, how i display the second combox - JSP-Servlet
Re: base the value of first combo box, how i display the second combox - JSP-Servlet
How to show autocomplete textbox values on combo box option selection using database?
How to Retrieve Data from the database and write into excel file using Java
How to create Combo Box in SWT
how to create a combo box in html
Store combo box value - Development process
How to get data from DB in to Text box by using Jsp & Ajax
JSP1
How to "Get data froom MySQL DB on giving a value in a tex-box in a JSP file."
how to retrieve data from multiple tables in jsp using javabeans
how to retrieve data from multiple tables in jsp using javabeans
how to retrieve data from multiple tables in jsp using javabeans
populate Combo Box dynamically
how to get selected name from combo box
how to get selected name from combo box
how to retrieve data from database
how to get selected name from combo box
how to get selected name from combo box
how to get selected name from combo box
retrieve value from db in text box + calendar implementation.
how to retrieve a checkbox value(retrieve from DB)
Retrieve data using Criteria api
how to store,retrieve,modify the data

Ads