I’m after some pointers on changing the background color of specific cells in a table (not rows or cells, but one or more specifig cells).
I have a dropdown, that upon selection will show some results, based on this
http://www.w3schools.com/php/php_ajax_database.asp
So far so good! I also have another non dynamically created table on the same page.
What i want to do is change the backgroud color of certain cells based on the result of the dropdown selection. Basically the static table is layed out like a floorplan, the color change will be to highlight your choice on the floorplan.
I’m really not sure of the best way to do this, my current thoughts are as follows…
Each cell in the table has a unique class
upon select, the results can include a reference to the applicable cell classes and the results are written to css somehow??
The page isn’t refreshed though so not sure how the changes would be picked up if written out to a css/php file…
any thoughts and pointers very much appreciated