You are here: Re: how to highlight cell « PHP SQL « IT news, forums, messages
Re: how to highlight cell

Posted by kenoli on 10/19/06 05:06

Suppose you created an array called $class_value. In each cell you had
something like this:

<td class = "<?php $class_value[{$_GET[5]}]" ?>" >

and the way you clicked on the cell sent a "GET" that set the value of
$class_value[{$_GET[5]}] to "current" and then you had a style named
..current that set the background to the color you want the current cell
to be. Each cell would have a different matched "get" index set in the
class php and the "get" that was sent so that only the array with the
index in that cell would be turned to "current.

At the beginning of the script you would reset the value of
$class_value before the "get" set it for the current cell.

I think something like that might work.

--Kenoli

toffee wrote:
> Hi all,
>
> 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.
>
> kind regards
>
> T

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация