I am using a mouseover event in a cell(TD) to change the bg color. Works in IE but not in NS. I included the JS. What am I doing wrong???
Thanks for your help!
<SCRIPT LANGUAGE="JavaScript">
<!-- Hiding JavaScript -
// Generic Browser test:
var tName = navigator.appName;
var tVer = parseInt(navigator.appVersion);
var NS4 = (tName == "Netscape" && tVer >= 4);
var IE4 = (tName == "Microsoft Internet Explorer" && bVer >= 4);
function ChgColor (id,inpColor){
if (!inpColor) { inpColor = 'cc9900' };
if (NS4) {
eval ('window.document.' + id + '.bgColor = \'' + '#' + inpColor + '\'');
} else if (IE4) {
eval (id + '.style.background = \'' + '#' + inpColor + '\'');
}
}
function RetColor (id){
if (NS4) {
eval ('window.document.'+ id + '.bgColor = null');
} else if (IE4) {
eval (id + '.style.background = \'\'');
}
}
// - End -->
</SCRIPT>
Thanks for your help!
<SCRIPT LANGUAGE="JavaScript">
<!-- Hiding JavaScript -
// Generic Browser test:
var tName = navigator.appName;
var tVer = parseInt(navigator.appVersion);
var NS4 = (tName == "Netscape" && tVer >= 4);
var IE4 = (tName == "Microsoft Internet Explorer" && bVer >= 4);
function ChgColor (id,inpColor){
if (!inpColor) { inpColor = 'cc9900' };
if (NS4) {
eval ('window.document.' + id + '.bgColor = \'' + '#' + inpColor + '\'');
} else if (IE4) {
eval (id + '.style.background = \'' + '#' + inpColor + '\'');
}
}
function RetColor (id){
if (NS4) {
eval ('window.document.'+ id + '.bgColor = null');
} else if (IE4) {
eval (id + '.style.background = \'\'');
}
}
// - End -->
</SCRIPT>