I am trying to use this line of code
[webView stringByEvaluatingJavaScriptFromString:@"test();"];
but it is not working. I have multiple javascript files and I do not know how to tell the program which one I am trying to use. The files are being loaded from a local html file. If anyone knows how I would really appreciate it or if someone knows another way of use objective c to call javascript.
Thanks
Clinton
Very likely you are trying to run this before the HTML is loaded.
WebViewloads asynchronously, even if the files are local. You need to implementWebFrameLoadDelegateand wait fromwebView:didFinishLoadForFrame:before attempting to engage the embedded JavaScript.