HighDots Forums  

how to use string.fontcolor() ?

JavaScript discussion (multi-lingual) JavaScript discussion (alt.comp.lang.javascript)


Discuss how to use string.fontcolor() ? in the JavaScript discussion (multi-lingual) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bob
 
Posts: n/a

Default how to use string.fontcolor() ? - 07-12-2004 , 11:17 AM






Hi,

I want to put a value of a button dynamically with a fontcolor.
The value is some text and a variable part which is the selected value in a
Select.

<INPUT id=go TYPE="submit" value="">
....
xval=new String()
xval=document.getElementById("mySelect").value //selected value =460
document.getElementById("go").value="this value " + xval.fontcolor("green")
+ " is in green"
....

I get: this value <FONT COLOR="green">460</FONT>is in green
How to get the value really in green?

Thanks
bob




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.