I am using the WebBrowser control in Windows Phone to invoke a javascript call. Right now, the code works fine when I reference the script online. However, when I reference it locally, it breaks.
I am thinking it has something to do with isolated storage and how WP7 apps install, but I wanted to get others takes.
The HTML file contains:
<script type="text/javascript" src="scripts/myJavascript.js"></script>
it works just fine when I do
<script type="text/javascript" src="http://mysite.com/myJavascript.js"></script>'
And idea how I can reference the file locally? I have it set to Content and Copy Always.
In the end, the real file is http://closure-library.googlecode.com/svn/trunk/closure/goog/base.js
I need to get it to work offline so my users don’t need an internet connection to use my app.
Thanks!
I cannot immediately see an issue with your approach, however, you have not shown the code you use to load the files into local storage. I would recommend looking at the sourcecode for PhoneGap, which loads multiple files into isolated storage for rendering in a WebBrowser, to see how it does it. Here is the relevant opart of the PhoneGap code: