Re: Change cell colour with selection from a drop down menu
| From: | Cristian Lavaque | Date: | Tue, 30 Sep 2003 05:44:24 +0000 |
| Subject: | Re: Change cell colour with selection from a drop down menu | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-164335@lists.php.net to get a copy of this message | ||
irinchiang@justeducation.com wrote:
> Hi all,
> I would like to create a dynamic kinda "Timetable"
whereby I
> can add, del, and modify the data contained in each cell.
Besides
> that, each cell in the table should have its unique colour in
which
> this unique colour can be modified anytime to a different
colour
> through an interface, most probably to be able to change the
cell
> colour with selection from a drop down menu. ( This is the part
where
> I really need some help. )How can this be done?
> Technology used are: PHP & MySQL
>
> Regards,
> Irin.
You'd use CSS for that. Create a class for each color you want to
give as options. In each cell tag add a var that'll be the class
for that cell, like "<td class=<?=cell01;?>>" and you'd assign
the color to that variable using the dropdown menu. To select the
cells, you could probably put a checkbox in each cell, so that
the checked cells will be the ones assigned the color you choose.
I think it could work, never done it myself yet, though ;)
Cristian