2

I get the following error:

SCRIPT16385: Not implemented

On the following line of code:

document.getElementById("amtcase").style = "background-color: #FFFFFF;";

"amtcase" is a text field

This only occurs on IE9, tested fine with Opera, Chrome, and FireFox.

raym0nd
  • 3,172
  • 7
  • 36
  • 73
Louis
  • 170
  • 2
  • 10

2 Answers2

6

In IE you can't assign the "style" attribute of a DOM node like that. You can do a couple of alternatives:

document.getElementById('amtcase').style.backgroundColor = '#FFFFFF';

or

document.getElementById('amtcase').style.cssText = 'background-color: #FFFFFF';
Pointy
  • 405,095
  • 59
  • 585
  • 614
4

Do:

document.getElementById("amtcase").style["backgroundColor"] = "#FFFFFF";

or

document.getElementById("amtcase").style.backgroundColor = "#FFFFFF";
Brian
  • 2,772
  • 15
  • 12