hi in my jsp page i am a having a jquery area which pass the values to a servlet which returns an output of dropdownlist . then the jsp file do some updation so certain values which are in the dropdownlist should not be there while repopulating. but it is not happening. my jquery code is
$("#cbocode").change(function(){
var cdid=$("#cbocode option:selected");
$.get("trnDC?caseNo=20&cdid="+cdid.text(),function(data){
$("#divinstrument").html(data);
})
and the servlet code is
case 20:{ //jquery call
String cdid=(String) request.getParameter("cdid");
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select instrumentid from mstinstrument where codeid='" + cdid + "' and rec_Status='A' and statusid='U' and Agentid='METLAB'");
if (!rs.wasNull()){
//List data=new ArrayList();
String v="<select id=cboinstr>";
while (rs.next())
{
// data.add(rs.getString("vend_code"));
v += "<option>" + rs.getString("instrumentid").toString() + "</option>";
}
v+="</select>";
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.print(v);
}
else{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.print("no data found");
}
where i am missing???