[thelist] Re: using JS to alter background colour of form input

Dunstan Orchard dunstan at 1976design.com
Sun Mar 9 13:08:01 CST 2003

Duncan, Hassan, thanks very much, that worked perfectly,

I've put a demo of the form (which is quite a nice form actually, using css,
and some good accessability features) up here:


The JS doesn't work in Opera for some reason :o/

> Duncan:
> *you have to separate the '#' string from the hex number, and use
>  the six-digit version.
> Something in this form works in IE6, Moz 1.0.1, and Opera 7.0;
> document.getElementById('FirstName').style.backgroundColor='#' + '000000';

thanks for that duncan... it did work when I included the # with the numbers
though, but I've swapped it for safety's sake.

Cheers - dunstan

Dorset, England

More information about the thelist mailing list