Hi
I have a javascript function.inside function i made a database call.My problem is i want to compare the id returned from database with the parameter in my function.I am not able to compare it.I am attaching my function also
function fillDetails(itemid){
document.getElementById("autionproductdetail").sty le.display='';
document.getElementById("itname1").style.display=' ';
document.getElementById("name").style.display='non e';
<%
ResultSet rs2;
try{
rs2=data.select("SELECT * from autionitem");
int id=0;
String name="";
int amt=0;
String sdate="";
String edate="";
String desc="";
String status;
while(rs2.next()){
id=rs2.getInt(1);
name=rs2.getString(3);
amt=rs2.getInt(4);
sdate=rs2.getString(5);
edate=rs2.getString(6);
desc=rs2.getString(7);
status=rs2.getString(8);

%>
if(flag==false){
int itId='<%= id %>';
if(itId==itemid){
document.autionproductinfo.itname.value='<%= name %>';
document.autionproductinfo.amount.value='<%= amt %>';
document.autionproductinfo.startdate.value='<%= sdate %>';
document.autionproductinfo.enddate.value='<%= edate %>';
document.autionproductinfo.itemdesc.value='<%= desc %>';
}
}
<% } %>
<% }catch(Exception ee){}
%>
}

Thanks in advance
Renjini