Ludwig Ruderstaller: insertAdjacentHTML

Beitrag lesen

Hallo,

nach sehr sehr langer zeit wieder mal eine Frage von mir.

<script language="JavaScript">
function addRow(){
    var code='this is a fu??ing test';
    var pos ='afterEnd';
    var t=document.getElementById('printhere');
    t.insertAdjacentHTML(pos,code);
}
</script>

im body:

<div id="printhere">TEST</div>

<a href="javascript:addRow();">fügs ein..</a>

alles was passiert ist daß die JS-Console meint:
Error: t.insertAdjacentHTML is not a function
Source File: http://oe1.bestheads.com/info/?view=config&action=new#
Line: 13

ein zb. t.style.border="1px solid black;" vor t.insertAd.. funktioniert tadellos, das object stimmt also.

Any Idea ?

TIA
Ludwig