|
Posted by Erwin Moller on 05/03/06 15:05
Bosconian wrote:
> I have two multiple select inputs. Initially the first contains a bunch of
> items and the second is empty. Using a common method, I move items back
> and forth by double clicking on them.
>
> This portion works perfectly, but I would also like to change the
> background color of the select element with the current focus.
>
> I have defined the following classes:
>
> .selected {
> background: #C0FFFF
> }
> .deselected {
> background: #FFFFFF
> }
> Using the following function below I am able to shift the background color
> of rows containing content, but the color of the empty rows remain the
> "selected" color. How can this effect be achieved for all rows, whether
> they contain content or not?
>
> Thanks!
>
> -----------------------------------------------------------
>
> function changeBackground(obj,theSelect) {
> for (var i=1; i<obj.length; i++) {
> obj[i].className = 'deselected';
> }
> obj[theSelect].className = 'selected';
> }
Hi Bosconian,
I think you misposted. :-)
This is comp.lang.php
I think you want a HTML or JS newsgroup.
Regards,
Erwin Moller
[Back to original message]
|