Javascript not executing in iPhone
<p>I want to execute javascript code from my iPhone application using UIWebView.</p>

<p>But only html part is executing while javascript part is not executing. It's also not showing an error.</p>

<pre><code>NSMutableString *htmlCode = [NSMutableString stringWithString:@"&lt;!DOCTYPE HTML&gt;"];


[htmlCode appendString:@"&lt;html&gt;&lt;head&gt;&lt;tilte&gt; sadaf &lt;/title&gt;"];

[htmlCode appendString:@"&lt;h1&gt;My First Web Page&lt;/h1&gt;"];


[ htmlCode appendString:@" &lt;p id='demo'&gt;This is a paragraph.&lt;/p&gt;"];
[self.webView loadHTMLString:htmlCode baseURL:nil];


webView.delegate= self;

[webView stringByEvaluatingJavaScriptFromString:@"&lt;script type='text/javascript'&gt;document.getElementById('demo').innerHTML=Date();&lt;/script&gt;   "];
</code></pre>
