Clickable TR
Posted: Wed Feb 25, 2009 2:28 pm
I have a list of database records that display in a table format. I don't want them to have to click the individual link. I'd like the entire table row to be a link. How can I do this?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
I've never had problems with things travelling up the DOM. Do you mean using something like this?pickle wrote:You can't make it a link per se, but you should be able to attach a click listener to it. There may be some issues with bubbling - ie: if the user clicks on a cell in that row, does the click event continue to travel up the DOM. If you're using a library (jQuery, Prototype, MooTools), I'd imagine the library would take care of that stuff.
Code: Select all
<tr onclick="window.location('whatever.php');"><td>blah</td></tr>