Sebastian: getElementById() -> Objekt erforderlich...

Beitrag lesen

Hallo!
Unten stehendes Script soll die Hintergrundfarbe von einer Zelle blinken lassen. Jedoch bekomm ich lediglich den Fehler: Objekt erforderlich...
Ich nehm mal an, das bezieht sich auf die Funktion getElementById().

Kann von euch mal jemand über den Codeauszug schauen was ich falsch gemacht habe?

Vielen Dank.

Gruß Sebastian

<script type="text/javascript">
 <!--
  x = true;
  i = 0;

function blink(objId,objClr){
   if(x){
    document.getElementById(objId).style.backgroundColor = objClr;
    x = false;

} else {
    document.getElementById(objId).style.backgroundColor = "transparent";
    x = true;

}
   setTimeout("blink()", 500);
  }
 //-->
 </script>

</head>
<body style="background-image:url(back2.jpg); background-repeat:repeat;">

<div style="margin-left:10px; margin-top:0px; position:absolute; top:20px; left:0px; min-height:480px; width:540px; background-color:#F0F0F0; border:solid 1px black; text-align:center; padding-bottom:20px;">
<div style="position:absolute; top:0px; left:0px;"><a href="frame_main.php">V UNIT1</a> -> <a href="frame_main.php">FEEDW</a> -> <a href="frame_main.php">P0LAA10DL</a></div><BR><H3>P0LAA10DL100          / L Ctrl Deaerator         </H3>
<TABLE style="text-align:left"><TR>
<TD id="las1" style="background-color:transparent; color:black; border:1px solid black">S</TD>
<TD></TD>
<script language="JavaScript">blink('las1','transparent')</script>