How would I do the following?
In the js, upon connection to this web-based/telnet/oracle application, a value is stored for the environment the user is logged into - i.e. prod, test, train, stage, inst, etc.
I want to change the font colour or the background image to indicate further which environment the user is logged into. This resides in the CSS. How would I do that?
Here is the JS that grabs this value and stores:
else if(key == "app.menu.title"
{
var title = HTMLEncode(replace(val, "\\", "/");
var envStr = new String (window.defaultStatus);
envStr = envStr.substring(31,(envStr.length-6));
document.all.divProgName.innerHTML = '[' + envStr + '] ' + title;
...
And here is where I want the CSS to change depending on the value of envStr:
.bProgramName
{
BACKGROUND: url(../images/programname_bg.gif);
BORDER-BOTTOM: solid 1px #336;
BORDER-TOP: solid 1px #336;
COLOR: #336;
FONT: bold .8em/2 "Georgia", Trebuchet MS, Arial, Helvetica, sans-serif;
LETTER-SPACING: 1px;
PADDING: 0 0 2px 20px
}
Any help is greatly appreciated. Hope this message makes sense.
Thanks,
Saira
In the js, upon connection to this web-based/telnet/oracle application, a value is stored for the environment the user is logged into - i.e. prod, test, train, stage, inst, etc.
I want to change the font colour or the background image to indicate further which environment the user is logged into. This resides in the CSS. How would I do that?
Here is the JS that grabs this value and stores:
else if(key == "app.menu.title"
{
var title = HTMLEncode(replace(val, "\\", "/");
var envStr = new String (window.defaultStatus);
envStr = envStr.substring(31,(envStr.length-6));
document.all.divProgName.innerHTML = '[' + envStr + '] ' + title;
...
And here is where I want the CSS to change depending on the value of envStr:
.bProgramName
{
BACKGROUND: url(../images/programname_bg.gif);
BORDER-BOTTOM: solid 1px #336;
BORDER-TOP: solid 1px #336;
COLOR: #336;
FONT: bold .8em/2 "Georgia", Trebuchet MS, Arial, Helvetica, sans-serif;
LETTER-SPACING: 1px;
PADDING: 0 0 2px 20px
}
Any help is greatly appreciated. Hope this message makes sense.
Thanks,
Saira