range.selectNode() is only worth a damn if you actually know what element to select and add to the selectNode() parameter - what if the page is dynamically created and what if the user selects stuff randomly as they do. How the hell are you supposed to know what elements he selected and how does one get all the nodes of the user's defined selection range only.

It seems all great to conjure up ranges yourself - as many articles on the net demonstrate, but what about users doing it in rich text editors - it seems that javascript falls on its face on range.selectNode()
- or -
i don't know what im talking about - but I have searched ad nauseum asked across many forums and got 100% nowhere on this question.

here is my code:
function GET_range()
{
RTE_r=new Array
var o=RTE_f
var s
var r
if(o.getSelection)
{
s=o.getSelection()
if(s.getRangeAt)
r=s.getRangeAt(0)
else
{
var r=o.document.createRange()
r.setStart(s.anchorNode,s.anchorOffset)
r.setEnd(s.focusNode,s.focusOffset)
}
}
else if(o.document.selection)
r=o.document.selection.createRange()
if(r)
{


var i=0
x=new Array
e=o.document.getElementsByTagName("*")
while(e[i])
{
a=r.selectNode(e[i])
if(a)
x[x.length]=a
i++
}
alert(x.length) // always 0


}
}
}