Welcome Guest Search | Active Topics | Sign In | Register

Modify HTML of rendered page Options
Nitesh
Posted: Saturday, August 22, 2015 1:51:29 AM
Rank: Member
Groups: Member

Joined: 8/4/2015
Posts: 10
I want to know which event is the best place to modify some piece of rendered HTML after a webpage has loaded successfully. I want to add some HTML tags to the document after parsing the rendered HTML. Please advise. Any example link will be great.
eo_support
Posted: Monday, August 24, 2015 9:13:59 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

You will need to do this in your page with JavaScript. You can inject your own JavaScript into the page through WebView.JSInitCode property.

Thanks!
Nitesh
Posted: Monday, August 24, 2015 1:40:39 PM
Rank: Member
Groups: Member

Joined: 8/4/2015
Posts: 10
Isn't there a method or event where I can get the Html of the page before it loads? I checked the LoadHtmlAndWait() function and it works beautifully. I was thinking a way to get all HTML dynamically, modify some bits and then load again. Just wondering if it's possible without javascript or not.

Thanks in advance.
eo_support
Posted: Monday, August 24, 2015 2:55:01 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

You would always do such thing with JavaScript. EO.WebBrowser only provides you the necessary "bridges" for you to run JavaScript (for example, JSInitCode is one, EvalScript is another).

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.