I have a table which is created through javascript function which is as below
Now you can see the cell \"VAT5.5\" is empty.there i have to get the database valu
<%
Connection con = null;
ResultSet rs = null;
ArrayList ar=new ArrayList();
String taxgroup;
try {
DBConnect db = new DBConnect();
con = db.getCon();
String sql = "select distinct TaxGroup from marketing_database.tax_info";
PreparedStatement smt = con.prepareStatement(sql);
rs = smt.executeQuery();
while(rs.next())
{
taxgroup=rs.getString(1);
ar.add(taxgroup);
System.out.println("Array is" +ar);
}
int size = ar.size();
System.out.println("size is" +size);
%>
<%
con.close();
smt.close();
rs.close();
}
catch(SQLException ex){
ex.printStackTrace();
}
%>
var cell7 = row.insertCell(6);
var element7 = document.createElement("select");
element7.setAttribute('multiple', '');
var jsArray = [];
<%for(int i=0;i
jsArray.push("<%= ar.get(i)%>");
<%}%>
// var optarr = ["vat1","vat2","vat3","vat4","vat5","vat6","vat7","vat8","vat9"];
alert(jsArray.length);
alert(jsArray);
for(var i = 0;i