Hi, again thanks for taking the time to reply.
Once the data is passed to the script, it then calls a servlet, which will then use that data to query a Database.
Actually the data that populates the table to start with, comes from a database, so the table is populated as follows, using a for loop(where pFiles and pMessages are arrays fed in from a servlet, the size of which can change):
<body>...
<% out.println("</table>");
for(int i = 0; i < pFiles.length; i++){
out.println("<tr onmouseover=\"this.bgColor='lightblue'\" onmouseout=\"this.bgColor='white'\" Style=\"cursor:hand\" onclick=\"check()\"><td>"+pFiles
+"</td><td>"+pmessage+"</td>"
}
out.println("</table>"); %>
...</body>
Now my aim is to get the data in the row once the user clicks in a row,
Are you saying:
1) that i could use an id in each td, so i should do the following(extracting just the td bit from above):
<td id=\"pFiles\" >"+pFiles+"</td>
2)But then as the id will change dynamically, how can i use the document.getElementbyId() function? Or what should be the parameter passing into the document.getElementById() ?
Again thanks for taking the time to reply.