I am using prototype 1.6.1 to insert and remove a div as a first child of another div. So I have parent div 'A'
and I do
$('A').insert(divB,'top');
then later
$('B').remove();
This works fine, but if I create the same div a second time and then try to remove it again I get an error that $('B').parentNode
is null. But if I look at $('A').innerHTML
it does show the child div 'B' inserted. I am seeing this only on firefox (on IE8 works fine).
Any hints of why this behavior?