Results 1 to 6 of 6

Thread: WebBrowser Control and InnerHTML

  1. #1

    Thread Starter
    Frenzied Member wengang's Avatar
    Join Date
    Mar 2000
    Location
    Beijing, China
    Posts
    1,602

    WebBrowser Control and InnerHTML

    Hi all.
    I'm using Web Browser control in Access, not VB, but I assume this is the same for both.

    When I look at a webpage in a browser like Chrome or IE and save the HTML file, all the attributes inside the tags have quotation marks around them (<div class="whatever").

    When I view source, I see they are getting single quotes (<div class='whatever).

    But when I get the InnerHTML from a web browser control, it has neither: <div class=whatever

    I have some code that parses the HTML, but it doesn't work when I use the InnerHTML because there are no quote marks around anything.

    Any ideas?
    Thanks.
    Wen Gang, Programmer
    VB6, QB, HTML, ASP, VBScript, Visual C++, Java

  2. #2
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,531

    Re: WebBrowser Control and InnerHTML

    Something sounds off...
    But when I get the InnerHTML from a web browser control
    How are you doing that?

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,746

    Re: WebBrowser Control and InnerHTML

    For the most part, you can use developer tools to debug web pages.
    myQQ,2776478814
    Are you Chinese, too?

  4. #4

    Thread Starter
    Frenzied Member wengang's Avatar
    Join Date
    Mar 2000
    Location
    Beijing, China
    Posts
    1,602

    Re: WebBrowser Control and InnerHTML

    Quote Originally Posted by techgnome View Post
    Something sounds off...

    How are you doing that?

    -tg
    I don't have it in front of me (did it at the office).
    I think it is WebBrowser1.Object.Body.InnerHTML.
    The WB is on a form in Access.
    Wen Gang, Programmer
    VB6, QB, HTML, ASP, VBScript, Visual C++, Java

  5. #5

    Thread Starter
    Frenzied Member wengang's Avatar
    Join Date
    Mar 2000
    Location
    Beijing, China
    Posts
    1,602

    Re: WebBrowser Control and InnerHTML

    I just replied here, but my post vanished apparently. I'll try to recapture it best I can.

    I meant to reply earlier today. I switched InnerHTML to OuterHTML and got the expected result, so problem solved.

    I'm a white American guy, not Chinese. I lived in China from the mid 1990s to the mid 2000s. That's where I learned to code.
    But I've been a Chinese-English translator for the past 15 years, so my coding skills have a lot of rust on them.
    Username is my Chinese name 文刚
    Wen Gang, Programmer
    VB6, QB, HTML, ASP, VBScript, Visual C++, Java

  6. #6
    Frenzied Member
    Join Date
    Aug 2020
    Posts
    1,421

    Re: WebBrowser Control and InnerHTML

    Deleted ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width