|
Posted by Marcin Dobrucki on 10/19/06 13:54
toffee wrote:
> I have a table with 12 cols and 10 rows. When a user clicks on a table cell;
> the page is refreshed and displays some data below the table dependant on
> whichever cell was selected.
> I would like to make it so that whichever cell was clicked; the background
> color is changed - so that when the user sees the data, (s)he can tell which
> cell it relates to.
>
> Does anyone know of a clever way to do this ?
> I'm afraid my creativity is running a bit dry on this one as the only
> working way i could come up with so far is to have an if statement before
> each table cell is created, which is long winded.
PEAR::HTML_Table, and then whatever you click inside the cell needs
to carry some coordinates. After that, its a simple matter of:
$table = new HTML_Table(/*your parameters*/);
//...
$table->updateCellAttributes($x,$y,$attributes);
Other than that, its basically the same solution as the others
suggested without the muck of writing it yourself.
Navigation:
[Reply to this message]
|