I need to view the another column <%=rs1.getString(2)%> depending on the select value.
I need to show that value in the text area.
How can I implement this?
-> pastebin.com/ewSB7KS6
<label for="issue_id"><strong>Select Issue:</strong></label>
<select name="issue_id" id="issue_id" required>
<option class="placeholder" selected disabled value="">Select</option>
<%
while(rs1.next()){
%>
<option value="<%=rs1.getString(1)%>"> <%=rs1.getString(1) %> <%=rs1.getString(2) %></option>
<% } %>
</select>
<label for="minfeed"><strong>Feed:</strong></label>
<textarea id="minfeed" rows="4" cols="50" name="minfeed" disabled="disabled"></textarea>
You can use
onchangeevent of jquery to get selected value and then put that selected value to textarea using.text().Demo code :Update 1: As i have already commented you can acheieve that by using ajax .So, your jquery code will look like below :
Now ,get value of that
selectin servlet usingrequest.getParameter("select");indoPostmethod and then passed this value to your query for selecting requiredfeed.Lastly, useresponse.getWriter().write("your feed");to send value back to ajax and show in textarea.