how to get the text that goes with an IHTMLAnchorElement

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

IHTMLAnchorElement gives access to almost everything about an HTML anchor --
except for the text string that gets displayed on the web page.

Is there an interface that gives access to the text?

Thanks,
Jeff
 
Thanks for the info.

MSDN doesn't show innerHTML as a member of IHTMLAnchorElement, and the SDK
C++ compiler agrees. I searched MSDN and found innerHTML (along with
innerText) in IHTMLElement.

To find the anchor I need, I have to match on the text string. So, I will
start by finding the IHTMLElement. But then I need the href value from
IHTMLAnchorElement.

When I've got an IHTMLElement, how do I get to the corresponding
IHTMLAnchorElement? Or is there a way to get the href value from
IHTMLElement?
 
After reviewing what little I know about IE extensibility, I realized this
isn't a problem. I can just query the same IDispatch pointer for all of the
various IHTML...Element objects.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top