I have a jsp page on which when i click submit button retrieves a resutlset(table orders) from the servlet
and displays on the same jsp page in a html table format. now i know that html rows have onclick event.My
requirement here is that when i click a row i shud pick one particular item(example order_no) of that row
and based on this order_no i want to retrieve data from another table called trades and display those records
next to this main table. and it shud change as i click another row.Now i just have an alert ->which means when i
click any row of the main table an alert message shows the order no of the row i clicked.But i want to display
the trades of that orderno.i hope u understood my problem.Cud u pls tell me how to proceed.

This is the code which im using to display the order table in the jsp page


<%
List orddet=(List)request.getAttribute("OrdersDet");
if (orddet!=null){
out.println("<table border=\"1\">");
out.println("<tr>");
out.println("<th>Trade Date</th>");
out.println("<th>Order No</th>");
out.println("<th>Security</th>");
out.println("<th>Exchange</th>");
out.println("</tr>");
for (int i=0;i<orddet.size();i++)
{
Map obj=(Map) orddet.get(i);

out.println("<tr onclick=\"Change('"+obj.get("ORD_NO")+"');\">");

out.println("<td>"+obj.get("TRD_DATE")+"</td>");
out.println("<td>"+obj.get("ORD_NO")+"</td>");
out.println("<td>"+obj.get("SECURITY")+"</td>");
out.println("<td>"+obj.get("EXCHANGE")+"</td>");
out.println("</tr>");
}
out.println("</table>");
}
%>


<script type="text/javascript">
function Change(value)
{
alert("the orderno is "+value);
}