I give up on this...
None of these javascript lines will set the background colour.
Any ideas ?
This needs to work in both IE and Netscape, including NS6 if possible.
------------------------
<span name="testt" > This should have a nasty red background </span>
<br>
<script>
//function to set span background color
function setcol() {
//document.testt.style.background='#ff0033'; //NO
//testt.style.background='#ff0033'; //NO
//testt.background='#ff0033'; //NO
//document.testt.style.backgroundcolor='#ff0033'; //NO
//testt.style.backgroundcolor='#ff0033'; //NO
testt.backgroundcolor='#ff0033'; //NO
}
setcol();
</script>
<br>
<span name="testt2" style="background:#ff0033" > Like this </span>
----------------------
Thanks, quick, clear response will earn an A grade.
<html>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
function setcol(myColor) {
if(document.all){
window.spanTest.style.back
}else if(document.layers){
document.spanTest.bgColor=
}
}
//End-->
</script>
</HEAD>
<body>
<span id="spanTest" name="spanTest" style="position:relative" > Like this </span>
<form>
<input type="button" value="change color" onClick="setcol('#00FFFF')
</form>
</body>
</html>