ForeColor Property

The ForeColor property contains the color of the text.


    document.all["id_name"].ForeColor [=color] 
Possible Values
    ColorValue that specifies or retrieves the text color.

    The property is read/write.
    ColorValue: An RGB (Red, Green, Blue) 32-bit color value that defines a solid color. Each of the Red, Green, Blue portions represents the color intensity between 0 and 255 (or 0x00 to 0xff hexadecimal). The RGB color value can be calculated: ColorValue = Red + Green*256 + Blue*65536. Please note that this representation differs from HTML color values, which are hexadecimal RRGGBB.
    The following example changes the ForeColor property depending on the specified color.

    <SCRIPT TYPE="text/javascript">
    function changeForeColor()
       if(document.all["id_StaticText"].ForeColor == 0)
          document.all["id_StaticText"].ForeColor = 241745845;
          document.all["id_StaticText"].ForeColor = 0;
    <OBJECT id="id_StaticText" width="170" height="12" 
    style="padding:0; margin:0; display:inline;" 
    	<PARAM NAME="BackStyle" VALUE="0">
    	<PARAM NAME="BackColor" VALUE="0">
    	<PARAM NAME="FontName" VALUE="Times New Roman">
    	<PARAM NAME="FontSize" VALUE="8.00">
    	<PARAM NAME="FontBold" VALUE="0">
    	<PARAM NAME="FontItalic" VALUE="0">
    	<PARAM NAME="FontUnderline" VALUE="0">
    	<PARAM NAME="FontWeight" VALUE="500">
    	<PARAM NAME="ForeColor" VALUE="0">
    	<PARAM NAME="Text" VALUE="Default text if necessary">
    <div onclick="changeForeColor()">Click to change colors!</div>

Applies to
    SiteKiosk v5.0 (and later versions).

Back to top