I'm trying to write a script that will allow users to change background & text colors for their user profiles. The script works fine in FF and Chrome but generates a Object Expected error in IE8. I've checked everything I can but I don't see a problem.
Code:
<script language="javascript" type="application/javascript">
function chgBackground(a,b) {
document.getElementById('adContent').style.backgroundColor = a;
document.getElementById('adContent').style.color= b;
}
</script>
here's one of the onClick events. I've tried with and without the 'javascript:' part.
Code:
<td><img src="images/color_1.jpg" alt="" width="17" height="17" onClick="javascript:chgBackground('#4f4f4f','#ffffff');" /></td>
any help is appreciated.
Chris