I have a span and a textbox that have identical text strings - actually,
the span reflects what's in the textbox. I'm trying to select text in the
span with the mouse and onmouseup make it select the matching text in the
textbox. Can this even be done? I've tried ye ol'
a=document.selection.createRange();
b=formname.textboxname.createTextRange();
b.select(a.text);
but that only selects the first instance of the a.text string in the
textbox - not the correct matching text. I've also tried the b.setEndPoint
("StartToStart",a) and b.setEndPoint("EndToEnd",a) but that gave me an
error. Is there a way to find out how far into the span text the
selection starts and ends then make it select the same text in the textbox?