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

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -