Lee R Liddick Jr
asked on
Change style of CFSELECT within a CFFORM (format='FLASH') using CFIF
I am trying to change the style of the values within a CFSELECT based on certain criteria of that record in the query.
ID Location BU
1 Harrisburg B,M,W
2 Orlando B
3 Austin B,W
4 Atlanta M
5 Miami M,W
Based on the example table above, if the Business Unit is M, then I want that location to show up in the CFSELECT as Blue...the rest, show in Black.
With the code that I have below, my flash form just doesn't load. I don't get any CF errors, the form just doesn't load.
ID Location BU
1 Harrisburg B,M,W
2 Orlando B
3 Austin B,W
4 Atlanta M
5 Miami M,W
Based on the example table above, if the Business Unit is M, then I want that location to show up in the CFSELECT as Blue...the rest, show in Black.
With the code that I have below, my flash form just doesn't load. I don't get any CF errors, the form just doesn't load.
<!---- this is the cfform ---->
<cfform format="flash"
name="myFORM"
action=""
method="POST"
skin="haloOrange">
<cfformgroup type="vdividedbox" id="DetailsBox02">
<cfselect
NAME="selLoc"
query="get_Locations"
display="Location"
value="ID"
multiple="yes"
size="11"
CLASS="tiny"
style="<cfif ListFind(#get_Locations.BU#, 'M')>color:blue;<cfelse>color:black;</cfif>"
width="233"
label="Location(s):"
tooltip="To select multiple locations, hold down the Ctrl button and click the name">
</cfselect>
</cfformgroup>
</cfform>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That's not good...
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Okay, since I apparently am not able to style the text color within the flash form
Btw: I'm specifically talking about styling list <options> *separately*. If you just want to style the whole list, that's doable.
ASKER
And I don't want to style the entire list...I only want to style specific values of the query.
Ok, that's what I thought. Styling the list is supported, but not the individual <option>'s afaik.
Hacking flash forms is a pain if you're not a flex/a.s. guru. (I'm not). There's a hack for changing the bgColor. But I'll be darned if I can figure out the one for text color..
Hacking flash forms is a pain if you're not a flex/a.s. guru. (I'm not). There's a hack for changing the bgColor. But I'll be darned if I can figure out the one for text color..
ASKER
Since it's not really working the way I wanted, I modified my code to make it work visually by using an '*' instead of a color change. I provided points to you both for your assistance.
ASKER
Open in new window