Hi there,
I have a small script that will change the background color of a variable in a drop down menu, however, I want to be able to change another variable to a different color, but do not know how.
This is what I have at the moment:
<option value="{$search_cat_id[var]}" style="background:
{if $search_cat_parent[var] == '0'}
{if $search_cat_id[var] == '98'}#FF0000
{else}#A9DD92{/if}
{else}#FFFFFF
{/if};">{$search_cat_name[var]}</option>
If I try this, it doesn't work:
<option value="{$search_cat_id[var]}" style="background:
{if $search_cat_parent[var] == '0'}
{if $search_cat_id[var] == '98'}#FF0000
{if $search_cat_id[var] == '99'}#000000
{else}#A9DD92{/if}
{else}#FFFFFF
{/if};">{$search_cat_name[var]}</option>