Click to See Complete Forum and Search --> : 'Unpositioned Element' error


dornbush
03-07-2003, 10:46 AM
I'm working on some custom pasting functionality and keep
getting the following error:

Unposition Element for this Operation

I have created a Range on document.selection and a
TextRange on window.document.body.

var selectionRange = document.selection.createRange();
var pasteRange = window.document.body.createTextRange();

pastRange <-- holds stuff I just pasted in

Everything's kosher until I try the following lines:

var range = selectionRange;
range.select();
range.pasteHTML( window.document.all.pasteArea.innerHTML );

That last line barfs and throws the unpositioned element
error. I can't find understandable documentation anywhere
on the error to learn what causes it or how to fix it.
Can anyone give me a hand?

--Paul