hello all, Can anyone explain whats going on 'under the hood' with textRanges in IE/javascript? What do the Start and End positions actually point to/reference?
I am using textRanges to process data entered by the user. I create an array of textRanges, one for each line, based on carriage returns in the data. Every thing works as I expect until I try to write a new string to the text range.
given : rng[5].text contains 'data line 5'
whether I use: rng[5].text = 'new text' or rng[5].pastHTML('new text') , the page will display the changed text, but now rng[5].text is empty and rng[5].select() does nothing.
I assumed the Start and End positions of the textRange' held position references to the page, and if I had back to back textRanges, increasing the text of the first would cause the Start and End of the second to readjust.....or at the least, if the positions were absolute, it would create overlapping ranges.....but that doesnt seem to be the case .
I realize there are plenty of other ways to parse/process a chunk of text, but what is my error as far as the textRange is concerned.