iOS loadHtmlString in UIWebView doesn't work with Javascript -
i have ios app load html string refer external css file , javascript file in same directory.
here html file:
<html> <head> <meta name="viewport" content= user-scalable="no", width="device-width" /> <meta http-equiv="content-type" content="text/html"; charset="utf-8"/> <link rel="stylesheet" type="text/css" href="mystyle.css" /> <script type="text/javascript" src="myjavascript.js"></script> </head>
the css file works fine seems js file never loaded. reason?
by way i'm using loadhtmlstring: baseurl method load html string.
thanks
this question bit old, since has not been answered, point out if web view load javascript file residing in bundle, way is:
[webview loadhtmlstring:html baseurl:[nsurl fileurlwithpath:[[nsbundle mainbundle] bundlepath]]];
if don't specify baseurl there no chance javascript file loaded.
Comments
Post a Comment