getting the IHTMLElement before (adjacent to) the TextRange

From: Santino (sankumar_nt_at_yahoo.com)
Date: 12/14/04


Date: 14 Dec 2004 15:22:01 -0800

Hi,

I want to get the html element adjacent to an htmltextrange.
For example: If I have html source as follows

<body>
<input name="sanjeev" disabled value="ssfs" size="100">
This is plain text
</body>

When I select the text, I want to get the pointer to the IHTMLElement
pointing to the adjacent <input> element.

I have sinked the HTMLTextContainerEvents for the body tag and have the
currently selected text in IHTMLTxtRange pointer.
I'm lost on what to do next?

Thanks in advance for any advise.
San