<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How To Inject JavaScript Functions Into a UIWebView</title>
	<atom:link href="http://iPhoneIncubator.com/blog/windows-views/how-to-inject-javascript-functions-into-a-uiwebview/feed" rel="self" type="application/rss+xml" />
	<link>http://iPhoneIncubator.com/blog/windows-views/how-to-inject-javascript-functions-into-a-uiwebview</link>
	<description>Tips and Tricks for iPhone, iPod, iPad and iOS Developers</description>
	<lastBuildDate>Sat, 28 Jan 2012 16:20:12 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Nick</title>
		<link>http://iPhoneIncubator.com/blog/windows-views/how-to-inject-javascript-functions-into-a-uiwebview/comment-page-1#comment-14937</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Mon, 22 Aug 2011 05:34:14 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneIncubator.com/blog/?p=355#comment-14937</guid>
		<description>@Daniel: You can create an event in JavaScript of the type KeyboardEvent and then dispatch it using the dispatchEvent() method.</description>
		<content:encoded><![CDATA[<p>@Daniel: You can create an event in JavaScript of the type KeyboardEvent and then dispatch it using the dispatchEvent() method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://iPhoneIncubator.com/blog/windows-views/how-to-inject-javascript-functions-into-a-uiwebview/comment-page-1#comment-13312</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Sat, 20 Aug 2011 18:57:35 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneIncubator.com/blog/?p=355#comment-13312</guid>
		<description>Can I use any of this to send a spacebar pressed event and arrow key event to a uiwebview? In the way you can pause/play hulu or youtube with the spacebar on a computer I would like to do the same with a button floating on top of my uiwebview.
Thanks,
noob</description>
		<content:encoded><![CDATA[<p>Can I use any of this to send a spacebar pressed event and arrow key event to a uiwebview? In the way you can pause/play hulu or youtube with the spacebar on a computer I would like to do the same with a button floating on top of my uiwebview.<br />
Thanks,<br />
noob</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis</title>
		<link>http://iPhoneIncubator.com/blog/windows-views/how-to-inject-javascript-functions-into-a-uiwebview/comment-page-1#comment-13243</link>
		<dc:creator>Dennis</dc:creator>
		<pubDate>Tue, 16 Aug 2011 15:41:39 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneIncubator.com/blog/?p=355#comment-13243</guid>
		<description>Nick,

Thanks for this post - I found it very useful. I am wondering if anyone knows if you can put an asychronous call in the javascript (e.g. out to a web service) and get the result back in the return value of stringByEvaluatingJavaScriptFromString? In this case I can&#039;t control if the call out is sync or asynch.</description>
		<content:encoded><![CDATA[<p>Nick,</p>
<p>Thanks for this post &#8211; I found it very useful. I am wondering if anyone knows if you can put an asychronous call in the javascript (e.g. out to a web service) and get the result back in the return value of stringByEvaluatingJavaScriptFromString? In this case I can&#8217;t control if the call out is sync or asynch.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://iPhoneIncubator.com/blog/windows-views/how-to-inject-javascript-functions-into-a-uiwebview/comment-page-1#comment-12966</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Tue, 02 Aug 2011 15:49:14 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneIncubator.com/blog/?p=355#comment-12966</guid>
		<description>injecting
var myFunction = function(){ /*function here*/ };
also works (which I include from a js file in my app bundle)</description>
		<content:encoded><![CDATA[<p>injecting<br />
var myFunction = function(){ /*function here*/ };<br />
also works (which I include from a js file in my app bundle)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Miner</title>
		<link>http://iPhoneIncubator.com/blog/windows-views/how-to-inject-javascript-functions-into-a-uiwebview/comment-page-1#comment-11878</link>
		<dc:creator>Andrew Miner</dc:creator>
		<pubDate>Wed, 15 Jun 2011 00:18:20 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneIncubator.com/blog/?p=355#comment-11878</guid>
		<description>Neat trick, but I can&#039;t seem to get it to work!  I can get my new `script` element to show up when I inspect the `innerHTML` of the `head` element, but whenever I try to access the function, it doesn&#039;t seem to be defined (e.g., `typeof(MyFunction)` returns &quot;undefined&quot;).  Has anyone run into that problem / have a workaround?</description>
		<content:encoded><![CDATA[<p>Neat trick, but I can&#8217;t seem to get it to work!  I can get my new `script` element to show up when I inspect the `innerHTML` of the `head` element, but whenever I try to access the function, it doesn&#8217;t seem to be defined (e.g., `typeof(MyFunction)` returns &#8220;undefined&#8221;).  Has anyone run into that problem / have a workaround?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: richtaur</title>
		<link>http://iPhoneIncubator.com/blog/windows-views/how-to-inject-javascript-functions-into-a-uiwebview/comment-page-1#comment-7560</link>
		<dc:creator>richtaur</dc:creator>
		<pubDate>Mon, 10 Jan 2011 08:59:54 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneIncubator.com/blog/?p=355#comment-7560</guid>
		<description>Dang I was wanting to go the other way: JavaScript calling Objective-C code. I&#039;ll keep looking. Still a helpful read, thanks!</description>
		<content:encoded><![CDATA[<p>Dang I was wanting to go the other way: JavaScript calling Objective-C code. I&#8217;ll keep looking. Still a helpful read, thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ashish</title>
		<link>http://iPhoneIncubator.com/blog/windows-views/how-to-inject-javascript-functions-into-a-uiwebview/comment-page-1#comment-6769</link>
		<dc:creator>ashish</dc:creator>
		<pubDate>Thu, 02 Dec 2010 03:49:55 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneIncubator.com/blog/?p=355#comment-6769</guid>
		<description>can u post complate example of javascript rollover image (means change image) with output ?</description>
		<content:encoded><![CDATA[<p>can u post complate example of javascript rollover image (means change image) with output ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: beginner</title>
		<link>http://iPhoneIncubator.com/blog/windows-views/how-to-inject-javascript-functions-into-a-uiwebview/comment-page-1#comment-6471</link>
		<dc:creator>beginner</dc:creator>
		<pubDate>Fri, 19 Nov 2010 12:46:41 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneIncubator.com/blog/?p=355#comment-6471</guid>
		<description>not sure what i&#039;m doing it correct or not. i&#039;m trying to display a custom font in UIWebView.

[webView stringByEvaluatingJavaScriptFromString:@&quot;myFunction();&quot;];  


how to call new myFunction(); 
??
thanks</description>
		<content:encoded><![CDATA[<p>not sure what i&#8217;m doing it correct or not. i&#8217;m trying to display a custom font in UIWebView.</p>
<p>[webView stringByEvaluatingJavaScriptFromString:@"myFunction();"];  </p>
<p>how to call new myFunction();<br />
??<br />
thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://iPhoneIncubator.com/blog/windows-views/how-to-inject-javascript-functions-into-a-uiwebview/comment-page-1#comment-14938</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Tue, 02 Nov 2010 05:37:56 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneIncubator.com/blog/?p=355#comment-14938</guid>
		<description>@shane: As far as I know this is not possible. UIWebView can display documents like PDF, PPT, etc., but those documents are not part of the browser DOM so there&#039;s no way to access any data from the document.</description>
		<content:encoded><![CDATA[<p>@shane: As far as I know this is not possible. UIWebView can display documents like PDF, PPT, etc., but those documents are not part of the browser DOM so there&#8217;s no way to access any data from the document.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://iPhoneIncubator.com/blog/windows-views/how-to-inject-javascript-functions-into-a-uiwebview/comment-page-1#comment-6118</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Mon, 01 Nov 2010 02:55:49 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneIncubator.com/blog/?p=355#comment-6118</guid>
		<description>Thank you. Exactly what I was looking for.</description>
		<content:encoded><![CDATA[<p>Thank you. Exactly what I was looking for.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 3/15 queries in 0.086 seconds using disk: basic
Object Caching 358/362 objects using disk: basic

Served from: iphoneincubator.com @ 2012-02-08 02:04:06 -->
