Great points from both of you! I’ll add another perspective—especially if you’re thinking about accessibility and semantic HTML.
Instead of handling everything in JavaScript, you can wrap the row content inside an anchor element and make the entire row look and behave like it’s clickable. Something like this:
<tr>
<td>
<a href="read_message.php?id=123" style="display:block; text-decoration:none; color:inherit;">
Row Content
</a>
</td>
</tr>
This way, your javascript navigate to url logic is partly handled natively by the browser, which is more accessible for screen readers and keyboard users. You can still apply hover styles to the <tr> or the <a> to keep things visually interactive. Sometimes letting HTML do the heavy lifting and using JS just for enhancements is a win-win.