>>I'm working with the ActiveX browser control that comes with VFP. I can retrieve blocks from the Document object by ID or user selected range. Is there something that will return just text without the HTML markup? It seems to me that if only text can be displayed in the browser I should be able to read it without the HTML.
>>Thanks
>
>AFAIK there is InnerText property in that control.
Borislav,
many thanks for the help. Could you help me a bit more?
Sample 1 and Sample 2 below work but:
If I use oBrowser.document.getElementById() innerText works
If I use oBrowser.document.Selection() innerText does not work
What do I need to change to make innerText work with .Selection()
Thanks, John
loRange = This.oBrowser.document.getElementById("SB5A9I3X7J0")
wait window loRange.innerText
loSelection = This.oBrowser.Document.Selection()
loRange = loSelection.CreateRange()
IF TYPE([loRange.htmlText])=[C]
wait window loRange.htmlText
ENDIF
IF TYPE([loRange.innerText])=[C]
wait window loRange.innerText
endif
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn