If you're working with JSP, you can accomplish this task as well. Here's a simple way to do it:
Before your loop begins, define a counter variable and set it to 0. Also, create another variable called isfirst outside the loop.
Within the loop, increment the counter variable like this: counter++. Following that, add a condition:
if (counter == 1)
{
isfirst = true;
}
Then, when generating each row, incorporate a check to see if it is the first row. If it is, skip adding the onclick event as shown below:
if (isfirst == true)
{
// Do not add onclick event for this row
}
else
{
// Add event for all other rows
}
Please Note: I am not familiar with JSP, but you can adapt the code provided above accordingly. Thank you!