[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:

http://www.1976design.com/testarea/form.html

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
http://www.1976design.com/
http://www.orchard.it/
http://www.maccaws.org/



More information about the thelist mailing list