Dieter Rausch
01-08-2004, 04:11 PM
Hi Everyone,
I am using the following code in a function to change the background and the text color of a button:
function indicateShortTrade() {
document.getElementById("btShort").style.backgroundColor="#FF0000";
document.getElementById("btShort").style.color="#FFFFFF";
window.focus()
}
The problem is that I am also trying to change the font to bold.
None of the properties I tried - or shall I say invented - worked. I tried ("btShort").fontweight="bold"; "btShort").style.text="bold" and various others, but the text stays normal.
If you know the correct code please let me know. And..., I nearly forgot, how to change back from "bold" to "normal" again.
Thanks,
Dieter
I am using the following code in a function to change the background and the text color of a button:
function indicateShortTrade() {
document.getElementById("btShort").style.backgroundColor="#FF0000";
document.getElementById("btShort").style.color="#FFFFFF";
window.focus()
}
The problem is that I am also trying to change the font to bold.
None of the properties I tried - or shall I say invented - worked. I tried ("btShort").fontweight="bold"; "btShort").style.text="bold" and various others, but the text stays normal.
If you know the correct code please let me know. And..., I nearly forgot, how to change back from "bold" to "normal" again.
Thanks,
Dieter