Gordon, here's a quick javascript that I threw together to do the
formatting. It's written against the prototype.js library. I'm not
sure how "cross browser" it is, but it works for IE6 and Firefox 1.5
<script type="text/javascript" src="includes/javascript/prototype.js"></script>
<select id="selecta" multiple="multiple" style="width:10em;">
<option value="a" id="opta">a</option>
<option value="b" id="optb">b</option>
<option value="c" id="optc">c</option>
<option value="d" id="optd">d</option>
<option value="e" id="opte">e</option>
<option value="f" id="optf">f</option>
</select>
<script type="text/javascript">
var opts = $('selecta').getElementsByTagName('option');
for (var i=0;i<opts.length;i++) {
if (i % 2) {
Element.setStyle(opts[i],{backgroundColor:'#00F',color:'#FFF'});
}
}
</script>
On 3/10/06, Gordon Cantor <[EMAIL PROTECTED]> wrote:
> Does anyone know of a way to display alternating backgrounds
> for each row in a select box????
> I do it for a table as shown below:
> <cfset bgcolor = "C0C58B">
> <cfif CurrentRow MOD 2>
> <cfset bgcolor = "8bc0c5">
>
> </cfif>
> <tr bgcolor=#bgcolor#>
>
> Gordon Cantor
> WSA
>
>
> -----Original Message-----
> From: CF-Community [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 10, 2006 6:07 AM
> To: CF-Community
> Subject: ColdFusion Community (CF-Community): Digest every 6 hours
>
> ColdFusion Community (CF-Community) 10-Mar-06
> Issue:3390
> In this issue:
> My next data room...
> Deanna how you doing ...
> FW: Soft Drinks may cause obesity
> FW: Soft Drinks may cause obesity
> interface idea (another one :)
> interface idea (another one :)
> My next data room...
> My next data room...
> My next data room...
> New Dog
> New Dog
> New Dog
> New Dog
> New Dog
> New Dog
> New Dog
> New Dog
> sleep apnea surgery scheduled
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:5:199540
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/5
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:5
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54