-
May 18th, 2021, 12:25 PM
#1
Thread Starter
Frenzied Member
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
-
May 18th, 2021, 01:15 PM
#2
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
-
May 18th, 2021, 01:18 PM
#3
Re: WebBrowser Control and InnerHTML
For the most part, you can use developer tools to debug web pages.
myQQ,2776478814
Are you Chinese, too?
-
May 18th, 2021, 07:07 PM
#4
Thread Starter
Frenzied Member
Re: WebBrowser Control and InnerHTML
Originally Posted by techgnome
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
-
May 18th, 2021, 07:11 PM
#5
Thread Starter
Frenzied Member
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
-
May 18th, 2021, 09:19 PM
#6
Re: WebBrowser Control and InnerHTML
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|