views:

17

answers:

1

Hi Everyone,

I have a script that generates a temporary HTML file that has links to external Javascript files that it requires to run.

<script src="file:///Users/raphaeldefranco/Library/Application Support/iPhone Simulator/User/Applications/BA9E724E-76BD-4F28-B224-54B4C73786D6/LogTen.app/Reports/Time by Year/../../Tools/PlotKit/Base.js" type="text/javascript"></script>

The links are absolute and they are to the right place (There is a CSS link as well that uses the same method and it works fine). I've been using the following, which finds images and CSS just fine but for some reason won't run the .js.

[webView loadRequest:requestObj]; 

I've tried changing the encoding of the files. I had a problem getting the CSS to work until the file was in unicode, but so far no luck. All the Script files are bundled with my project etc.

Thanks in advance!

A: 

You can't access things outside the application bundle directory. Just copy them in and access them without the path. They will be in a different location anyway when installed on the device.

rob
Thanks Rob, that definitely set me on the right path, I ended up using the other method for loading a web page that specifies a local directory and changing the HTML links to be local and that worked.
Raphael