I have an HTML page generated by an objective-C application and I want to load and open it in a local directory (not in a web server). The javascripts jquery.js and jquery.plot.js are stored in the same directory before the page is loaded. I made the HTML page by following closely the examples available on http://flot.googlecode.com/ The scripts are declared in the HTML page as follows :
<script src="jquery.js" language="javascript" type="text/javascript"></script>
<script src="jquery.flot.pack.js" language="javascript" type="text/javascript"></script>
When I open the page, the expected graph (generated by the scripts) doesn't show up and I have the following syntax error in the javascript console :
Uncaught SyntaxError: Unexpected token ILLEGAL
The script source in the javascript console is made of strange (chinese ?) ideograms which are obviously "unexpected token" if it is what the browser sees. I have the same problem with Chrome, Firefox and Safari. The problem is not systematic because sometimes, it works !. I have made tests with files prepared manually and again it works sometimes only. I have also copied the same file which didn't work in another directory where the jquery scripts were present and, surprise, it worked ! but not always... I have exhausted all my ideas on this problem and your help will be very much appreciated