7 var l
= document
.createElement("div");
9 l
.innerHTML
="<s>jmd</s> jtr was here.";
10 l
.setAttribute("id", "popup");
11 l
.style
.position
= "absolute";
13 // afaict only 'tr' causes a crash.
14 // 'td', 'table', 'a1' don't.
15 document
.getElementById('tr').appendChild(l
);
18 function closepopup() {
19 var p
= document
.getElementById("popup");
20 if (p
&& p
.parentNode
) {
21 // crashes on following line
22 p
.parentNode
.removeChild(p
);
28 <a id='a1' href=''
onclick=
" note(); return false;">note
</a>
29 <a id='a2' href=''
onclick=
"closepopup(); return false;">closepopup
</a>
31 <table id='table' border='
1'
>
33 <!-- this div is just here to demonstrate that the crash
34 only happens with a dhtml-generated div -->
35 <div id=
"popup" style=
"position:absolute;">