reading the contents of an HTML control RRS feed

  • Question

  • Is it possible to read the contents of an HTML ("DISPLAYCLASS") control? I'll be thrilled with a way to do it either from outside the control or from inside using javascript. 

    So far, I've tried from the outside with GetWindowText(), which returns nothing, and from the inside with document.documentElement.innerHTML, which just dies silently, never returning control and throwing no exceptions. 

    Tuesday, December 9, 2008 9:32 PM

All replies

  • Hi FreemanNg,

    Please refer to the following thread:


    If you still can't solve it, please let me know.


    Best regards,

    Guang-Ming Bian - MSFT

    Thursday, December 11, 2008 3:48 AM
  • Thanks, but now that I have a IPIEHTMLDocument pointer, how do I use it to read the full HTML content of the control?

    I should have been more clear in my original message. What I'd like is to essentially read the full HTML text currently being displayed in the control, the way a GetWindowText() would retrieve the full contents of, say, an edit control.

    Is this even possible?

    I thought my best bet would  be to do it from inside the page, through the javascript document.documentElement.innerHTML, but that didn't work, as stated above.

    Friday, December 12, 2008 4:06 AM