I am trying to develop a HTML table with embedded PHP so that when a row is selected, that row is highlighted and its index can be found? Not entirely sure how to implement this ANY iDEAS ANYONE?
PS I've developed the table trying to implement row selection.
Selecting items from a table
Moderator: General Moderators
Need javascript you do. Be totally done in php it can not. Client side stuff this is.
try something like this you should:
try something like this you should:
Code: Select all
<tr onClick="e;this.style.backgroundColor='343433'"e;>- CoderGoblin
- DevNet Resident
- Posts: 1425
- Joined: Tue Mar 16, 2004 10:03 am
- Location: Aachen, Germany
A possible useful link for javascript:
http://www.alistapart.com/articles/tableruler/
Ok it uses a hover event but may be of use. Getting it to be a click event wouldn't be too hard to do. I would keep it as a hover event with the onclick storing the value, not doing anything with the display.
http://www.alistapart.com/articles/tableruler/
Ok it uses a hover event but may be of use. Getting it to be a click event wouldn't be too hard to do. I would keep it as a hover event with the onclick storing the value, not doing anything with the display.