How to inject local javascript file?

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

How to inject local javascript file?
 
Konrad Gorski




Posts: 6
Joined: 2012-07-23
Hi,

I found some explanations how to inject javascript fr om external server, for example here:
Cannot inject the script
Working good ;)
I have ca. 15 js files, more than 0.5MB to inject, development phase ;)
I'm looking now for possibility to hold all my javascript files locally, in add-on 'body' (or somewh ere in file system).

Is it possible? Give me some tips, please.

Regards
Konrad
Posted 23 Jul, 2012 06:30:42 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Konrad,

Of course, you can keep the JS code locally and inject it into the web page at runtime. However, 0.5 MB is too much for such things. That is why I would recommend moving all the code to the add-on rails.

Also please take a look at How to run and replace a script (JavaScript, JScript or VBScript) on an HTML page in IE 6 or 7 sample add-on project available for downloading in the HOWTO section of our web site.
.NET, Extended MAPI, Windows Phone & RT
Posted 23 Jul, 2012 07:03:55 Top