modify html code on the fly



Hello,

I have been trying to get this to work for days now and am having very
little luck with it. I'm trying to use the IWebbrowser2 control to
essentially capture the html before it is render so i could alter the
html code then have the new html rendered. One example of what I am
trying to do is to replace an image on a site with my own image. So
basically it would replace the <img src = "/base/logo.jpg" with my own
- <img src="c:\mylogo.jpg".

I have had some success using various events, such as
'OnNavigateComplete', 'OnDocumentComplete', and 'OnDownloadComplete'.
However, they do not work for all sites. It seems like on sites with
more to download, the rendering will begin before these events are
triggered. As a result, (using the example above), the originally
image is rendered and then the event is triggered and then the image
is replaced. Needless to say, this is not exact what I want.

Does anyone have any suggestions on how I can be assured that I am get
the html before it is rendered???

Any help would be greatly appreciated.

Thanks,
Chris
.



Relevant Pages