I have a web enabled application. I would like the background of a certain table be ‘blue’ in one condition and ‘green’ in another condition… How can this be done?
Subject: Change the colors “CLASSICAL”
Hi John,
try the following:
Add to the HTML attributes a class name for your table, eg. “resultdisplay”
If you can evaluate your condition in the HTML Head section … perfect, otherwise (tested with IE6 but should work in all newer browsers) put this above the table in a computed for display field and makr it passthru HTML
“<style type="text/css">.resultdisplay {”+@if(YourCondition;“background-color : blue”;“background-color : red”)+“}”
With this approach you not only can play with the background but also with fonts, borders etc. Some CSS knowledge needed.
Hope that helps!
Subject: RE: Change the colors “CLASSICAL”
Try this, i have created a function and call this function whereever u need to. change the colors to wat u want.
function getColor () {
return c = ( (c==“#FFFFFF”) ? “#FFFFCC” : c=“#FFFFFF” );
}
hope this helps…