Change script / image / iframe url before it loads in C#

Add-in Express™ Support Service
That's what is more important than anything else

Change script / image / iframe url before it loads in C#
Was this concept ever released ? 
Robert Apostolico


Guest


Eugene Astafiev and Support Team,

Was this topic/post ever resolved?
http://www.add-in-express.com/forum/read.php?FID=10&TID=10762

If so, is there a sample of such functionality?

Thank you.
Posted 16 May, 2014 10:57:34 Top
Andrei Smolin


Add-in Express team


Posts: 18719
Joined: 2006-05-11
Hello Robert,

Please check the sample project labelled "How to modify HTML source code before it is rendered in IE" in http://www.add-in-express.com/support/ie-vbnet-csharp.php.


Andrei Smolin
Add-in Express Team Leader
Posted 19 May, 2014 03:18:37 Top
Robert Apostolico


Guest


Andrei,

Can you please check w/ Sergey in reference to this:
http://www.add-in-express.com/forum/read.php?FID=10&TID=12378

I'm following the concept you mentioned above, but the page/site (gmail) that I'm working with uses frames and iframes, and I'm having a problem controlling that my injected script is only injected once into the main/primary page.

Sergey mentioned that the HTMLDocument object isn't available in the OnDataAvailable event.

He suggested using DocumentComplete.

Perhaps it is a misunderstanding on my part. If I use the DocumentComplete concept, how do I get the browser to execute it on first load? I don't want the user to have to do f5/refresh or anything along those lines.

What is the different between hooking into the OnDataAvailable vs DocumentComplete?
When/why would you use each method/event?

THANK YOU!
Posted 19 May, 2014 07:59:48 Top
Andrei Smolin


Add-in Express team


Posts: 18719
Joined: 2006-05-11
Robert Apostolico writes:
If I use the DocumentComplete concept, how do I get the browser to execute it on first load?


First load?


Andrei Smolin
Add-in Express Team Leader
Posted 19 May, 2014 09:10:25 Top
Robert Apostolico


Guest


Andrei,

Sorry for the confusion. On the first document loaded (primary/top-level document) from GMail.

Sergey had pointed me to HTMLDocument.parentWindow.execScript("MyFunction();");

which I am currently experimenting with.

I'll keep you posted.
Posted 19 May, 2014 09:14:17 Top