|
Answer» creating a site using HTML and i'm just wondering if this is possible or if i'm just wasting my time:
what i have is a table with multiple cells. in each cell there is an input, either a dropdown or text field.
what i want to know is, can the input or selection of the user affect the bg color of the cell?
in case that doesnt make SENSE... Example: a table with 2 cells. each cell has a dropdown menu with "yes" or "no". the user selects either one in each cell and clicks a submit button. after CLICKING submit, if the user selected yes in a cell, the bg color of the cell turns green, but if they chose no, the bg color turns red.
is that possible? thanks Quick thoughts - JS could well be the WAY to go tho have no code to suggest right now.
Other possible might be to set up a link properties set in css, specific to this table situation - and give your drop down contents a null href each .... and so make it possible to have a css set like - a.cells, a.cells:hover and a.cells:visited - PROBABLY leaving out the hover as not too necessary.
Mind you - this is when I think on it only going to change color of the selected LIST item, not the cell itself.
I'll give it more thought if time allows. Bit busy.Quote from: ChrisXPPro on July 30, 2008, 06:29:05 PM Quick thoughts - JS could well be the way to go tho have no code to suggest right now.
Other possible might be to set up a link properties set in css, specific to this table situation - and give your drop down contents a null href each .... and so make it possible to have a css set like - a.cells, a.cells:hover and a.cells:visited - probably leaving out the hover as not too necessary.
Mind you - this is when I think on it only going to change color of the selected list item, not the cell itself.
I'll give it more thought if time allows. Bit busy.
Yes, I donot think that html has that kind of thing. The only possible wa y I would think is java script...
Head over here to find some very cool and helpful java scripts that might solve your problem. yeah, i'll go ahead and try JS. thank you both for the help
|