Click to See Complete Forum and Search --> : Change Font color in Fomr element


jmarti
03-19-2003, 04:38 PM
I have a Form which activates a JavaScript functio when submitted. I would like the function to change the font color of some of the text boxes. How can I do this. So far the call to the function works fine and I can change the text in the text boxes, but I have not been able tochange the font color.

the function looks something like:

function testing(maps)
{
maps.tex1.value="hello"
}

this puts the word hello in the text box text1, but I would like to also control the color of the font.

Thanks for your help

Jona
03-19-2003, 04:57 PM
Change this line:

maps.tex1.value="hello"

to this:

document.frm.blah.style.color="yellow"

Change yellow to whatever color you want. You can also use RGB (e.g., red or #FF0000)