I have added a "Status" Select Box field with three options Booked, Available and Not Available. I would like to change the bgcolor based on the "Status" field.
I have used the following code in default.html to be able to have the text background be based on the "Status" field and it works fine, but I would prefer to chnage the color of the entire cell rather than just the text background:
<% if ($EVENT->{details}->{status} eq "booked") {$color="#FF9999";}
elsif ($EVENT->{details}->{status} eq "available") {$color="#00FF00";}
elsif ($EVENT->{details}->{status} eq "notavailable") {$color="#00FF00";}
else {$color="#FFFFFF";}%>
<span style="background:<%=$color%>">
I have a working calendar at http://www.vtsr.com/renoCalendar3.htm that I am experimenting on.
Thanks
Doug
[This message has been edited by drhurd (edited April 05, 2006).]