I have the following innocent looking code (index.html), but it doesnt load the code.js file. It works well if I copy / paste the contents of the file in the html page. Both index.html and code.js files are in the same directory. This is the code snippet. Any help would be great.
index.html :
<html>
<head>
<script type="text/javascript" src="code.js"></script>
</head>
<body onload="drawImage()">
</body>
</html>
ViewController.m:
- (void)viewDidLoad {
[super viewDidLoad];
// load the first webpage
[homePageWebView loadRequest:[NSURLRequest requestWithURL:[NSURLfileURLWithPath:[[NSBundle mainBundle] pathForResource:@"index"ofType:@"html"] isDirectory:NO]]];
}