<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Dangly Bits</title>
	<atom:link href="http://www.thedanglybits.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thedanglybits.com</link>
	<description>Taking the IE out of danglie</description>
	<lastBuildDate>Tue, 21 Jul 2009 19:54:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Engineer maxim</title>
		<link>http://www.thedanglybits.com/2009/07/21/engineer-maxim/</link>
		<comments>http://www.thedanglybits.com/2009/07/21/engineer-maxim/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 19:54:07 +0000</pubDate>
		<dc:creator>stembrain</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[maxim]]></category>

		<guid isPermaLink="false">http://www.thedanglybits.com/2009/07/21/engineer-maxim/</guid>
		<description><![CDATA[Measure twice, cut once.
]]></description>
			<content:encoded><![CDATA[<p>Measure twice, cut once.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedanglybits.com/2009/07/21/engineer-maxim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programmer maxim</title>
		<link>http://www.thedanglybits.com/2009/07/21/programmer-maxim/</link>
		<comments>http://www.thedanglybits.com/2009/07/21/programmer-maxim/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 19:53:53 +0000</pubDate>
		<dc:creator>stembrain</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[maxim]]></category>

		<guid isPermaLink="false">http://www.thedanglybits.com/2009/07/21/programmer-maxim/</guid>
		<description><![CDATA[Start with ping;
trim() everything;
]]></description>
			<content:encoded><![CDATA[<p>Start with ping;<br />
trim() everything;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedanglybits.com/2009/07/21/programmer-maxim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lifehack &#8211; Maintaining the catbox</title>
		<link>http://www.thedanglybits.com/2009/06/18/lifehack-maintaining-the-catbox/</link>
		<comments>http://www.thedanglybits.com/2009/06/18/lifehack-maintaining-the-catbox/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 21:53:38 +0000</pubDate>
		<dc:creator>stembrain</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.thedanglybits.com/?p=62</guid>
		<description><![CDATA[
To begin, put on your imagination hat and/or face-mask.
Remember how the participants in great Cali gold rush avidly sifted through the silt and creek water for months just to find a nugget.
Prepare a slotted scooper in your dominant hand, and a plastic bag saved from the grocery store in the other hand.
Sift kitty silt through [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>To begin, put on your imagination hat and/or face-mask.</li>
<li>Remember how the participants in great Cali gold rush avidly sifted through the silt and creek water for months just to find a nugget.</li>
<li>Prepare a slotted scooper in your dominant hand, and a plastic bag saved from the grocery store in the other hand.</li>
<li>Sift kitty silt through the slots, bagging it when you find some.</li>
</ol>
<p>Step 2 is important for convincing others, especially children, that this chore is enjoyable.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedanglybits.com/2009/06/18/lifehack-maintaining-the-catbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using multiple templates with DokuWiki</title>
		<link>http://www.thedanglybits.com/2009/06/17/using-multiple-templates-with-dokuwiki/</link>
		<comments>http://www.thedanglybits.com/2009/06/17/using-multiple-templates-with-dokuwiki/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 01:07:37 +0000</pubDate>
		<dc:creator>VulgarisOverIP</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.thedanglybits.com/?p=59</guid>
		<description><![CDATA[Time for that biennial blog post, right?
Anyways, DokuWiki is a PHP based wiki that&#8217;s powerful enough to run your entire site or integrate with whatever you already have. Setting up a different look for the wiki is simple, just a matter of changing templates. But what if you want more than one look (template)?
Let me [...]]]></description>
			<content:encoded><![CDATA[<p>Time for that <a href="http://answers.yahoo.com/question/index?qid=20070815084558AARzWSC">biennial</a> blog post, right?</p>
<p>Anyways, <a href="http://www.dokuwiki.org/dokuwiki">DokuWiki</a> is a PHP based wiki that&#8217;s powerful enough to run your entire site or integrate with whatever you already have. Setting up a different look for the wiki is simple, just a matter of changing templates. But what if you want more than one look (template)?</p>
<p>Let me answer that question by asking another question: Why would you possibly want to two different templates for the same wiki? Well the main reason would be if you had separate administration (intranet) and public sections of your site, each with their own custom look. It would just be weird to log into your admin site, start reading a page with one theme, click a link and then view a related page in a totally different way. Not to mention that all your admin links are now gone and just as you click the back button your remember you had previously submitted a form that sent an email to all 5000 of your clients. Well, maybe they won&#8217;t even notice&#8230;</p>
<p>So, where do we start?</p>
<ol>
<li>Google <a href="http://www.google.com/search?q=multiple+dokuwiki+templates">&#8220;multiple dokuwiki templates&#8221;</a></li>
<li>Check the first few links</li>
<li>Ooh! <a href="http://tatewake.com/wiki/software:dokuwiki:template:multitemplate">Multitemplate plugin for Dokuwiki</a></li>
<li>Hmm, last version is from 1/1/07 (that&#8217;s older than <strong>MY</strong> posts). Also won&#8217;t let us view the same page using two different templates. No good.</li>
<li>Give up on Google, no one can code better than me!</li>
<li>Begin randomly coding</li>
</ol>
<p>My first attempt at a solution was a simple extension of <a href="http://www.dokuwiki.org/plugin:xbr">xbr plug-in</a>. I think it originally was supposed to convert new-lines to &lt;br /&gt;&#8217;s or something crazy like that. I modified it to check the current URL and if it contained certain magic properties (&#8221;&amp;theme=public&#8221;, for example) it would rewrite all the links on the page to also include some magic. Then I modified my one template to check for magic as well, which loaded one of two template options boot-strap style.</p>
<p><strong>This solution was ugly.</strong> A waste of a good 32 minutes. At least. Also, it didn&#8217;t work. Links like &#8220;Edit this page&#8221; and &#8220;Admin&#8221; weren&#8217;t affected and it turned out that DokuWiki is so smart that it caches all the HTML it produces and then &#8220;freezes&#8221; your links after the first page visit.</p>
<p>Second attempt. This time, using the old noodle! Here&#8217;s the correct way to do it:</p>
<ol>
<li>Separate the original boot-strapping template into two separate templates</li>
<li>Make a symbolic link to the /wiki directory (contains DokuWiki code) in another directory (/intranet/wiki maybe?)</li>
<li>Modify the local.protected.conf file to check the URL for the alternate directory and then load appropriate template</li>
</ol>
<p>Here&#8217;s an example of the only code you need:</p>
<p><code>if (isset($_SERVER['REQUEST_URI']) &amp;&amp;<br />
strstr($_SERVER['REQUEST_URI'], '/intranet/') !== false) {<br />
$conf['template'] = 'intranet';<br />
}</code></p>
<p>That&#8217;s it! You only need one copy of the [DokuWiki] code, one copy of the [DokuWiki] data, a symbolic link and 2-3 lines of extra code. No caching problems, no extra plug-ins and a good excuse to blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedanglybits.com/2009/06/17/using-multiple-templates-with-dokuwiki/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Have you ever done this?</title>
		<link>http://www.thedanglybits.com/2009/06/17/have-you-ever-done-this/</link>
		<comments>http://www.thedanglybits.com/2009/06/17/have-you-ever-done-this/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 00:04:20 +0000</pubDate>
		<dc:creator>stembrain</dc:creator>
				<category><![CDATA[GMail]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.thedanglybits.com/2009/06/17/have-you-ever-done-this/</guid>
		<description><![CDATA[
Hopped on your cousin&#8217;s computer for a quicksec
Noticed that it&#8217;s Windows XP Home
Noticed it runs IE6
Noticed that among the myriad icons alongside the taskbar&#8217;s clock, not a single one seems to be a virus scanner.
Logged in to your gmail, despite your better intentions.
Logged out of gmail and immediately used your trusty phone to log back [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>Hopped on your cousin&#8217;s computer for a quicksec</li>
<li>Noticed that it&#8217;s Windows XP Home</li>
<li>Noticed it runs IE6</li>
<li>Noticed that among the myriad icons alongside the taskbar&#8217;s clock, not a single one seems to be a virus scanner.</li>
<li>Logged in to your gmail, despite your better intentions.</li>
<li>Logged out of gmail and immediately used your trusty phone to log back in to your gmail account.</li>
<li>Changed your gmail password <strong>from the phone</strong></li>
</ol>
<p>A buddy emailed me from an internet cafe in Panama saying something like &#8216;hey brrooooo I&#8217;m emailing you from a net cafe in Panama!&#8217; My reply: Go change your password. Better yet, tell me our password and I&#8217;ll change it for you from *my* computer.</p>
<p>I won&#8217;t even consider the notion that your bank account was logged in to on your cousin&#8217;s computer. Don&#8217;t  expose your webmail passwords to any device that isn&#8217;t owned and maintained by yourself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedanglybits.com/2009/06/17/have-you-ever-done-this/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jquery.suggest 1.1</title>
		<link>http://www.thedanglybits.com/2007/08/06/jquerysuggest-11/</link>
		<comments>http://www.thedanglybits.com/2007/08/06/jquerysuggest-11/#comments</comments>
		<pubDate>Mon, 06 Aug 2007 19:59:53 +0000</pubDate>
		<dc:creator>VulgarisOverIP</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jquery.suggest]]></category>

		<guid isPermaLink="false">http://www.vulgarisoip.com/2007/08/06/jquerysuggest-11/</guid>
		<description><![CDATA[It&#8217;s been a while since my last post, and I&#8217;ve got a lot of great ideas to get down on blog, but first I&#8217;d like to announce a new version of jquery.suggest. Some new features include:

Improved cross-browser compatibility (tested to work the same across Firefox/Safari/IE6/IE7)
Cache bug has been fixed that caused suggestions to &#8220;forget&#8221; to [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a while since my last post, and I&#8217;ve got a lot of great ideas to get down on blog, but first I&#8217;d like to announce a new version of jquery.suggest. Some new features include:</p>
<ul>
<li>Improved cross-browser compatibility (tested to work the same across Firefox/Safari/IE6/IE7)</li>
<li>Cache bug has been fixed that caused suggestions to &#8220;forget&#8221; to hide</li>
<li>Moved some stylings from JavaScript to CSS</li>
<li>Cleaned up code, started heavy commenting</li>
<li>Not exactly a new feature, but jquery.suggest will soon be on jQuery&#8217;s plugin page</li>
</ul>
<p>For more information, please see <a href="http://www.vulgarisoip.com/2007/06/29/jquerysuggest-an-alternative-jquery-based-autocomplete-library/">this previous post</a>. While the plugin works in Opera, it&#8217;s not perfect (which is why I didn&#8217;t mention it above) and I&#8217;m still working on it.</p>
<p><a href="http://www.vulgarisoip.com/files/jquery.suggest.js">Download it here</a> (example CSS <a href="http://www.vulgarisoip.com/files/jquery.suggest.css">here</a>) and give me some feedback.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedanglybits.com/2007/08/06/jquerysuggest-11/feed/</wfw:commentRss>
		<slash:comments>83</slash:comments>
		</item>
		<item>
		<title>Updated minify library for PHP 4</title>
		<link>http://www.thedanglybits.com/2007/07/11/updated-minify-library-for-php-4/</link>
		<comments>http://www.thedanglybits.com/2007/07/11/updated-minify-library-for-php-4/#comments</comments>
		<pubDate>Thu, 12 Jul 2007 00:05:22 +0000</pubDate>
		<dc:creator>VulgarisOverIP</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.vulgarisoip.com/2007/07/11/updated-minify-library-for-php-4/</guid>
		<description><![CDATA[I&#8217;ve updated my PHP 4 version of minify which you can download here. This new version now supports external linking to minified JavaScript and CSS through the use of &#60;link&#62; and &#60;script&#62; tags. You can find instructions on implementing this method here, it&#8217;s the same as standard minify.
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve updated my PHP 4 version of <a href="http://code.google.com/p/minify/">minify</a> which you can <a href="http://www.vulgarisoip.com/files/minify_php4.zip">download here</a>. This new version now supports external linking to minified JavaScript and CSS through the use of &lt;link&gt; and &lt;script&gt; tags. You can find instructions on implementing this method <a href="http://code.google.com/p/minify/wiki/UserGuide">here</a>, it&#8217;s the same as standard minify.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedanglybits.com/2007/07/11/updated-minify-library-for-php-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery 1.1.3 is out</title>
		<link>http://www.thedanglybits.com/2007/07/01/jquery-113-is-out/</link>
		<comments>http://www.thedanglybits.com/2007/07/01/jquery-113-is-out/#comments</comments>
		<pubDate>Mon, 02 Jul 2007 02:08:25 +0000</pubDate>
		<dc:creator>VulgarisOverIP</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.vulgarisoip.com/2007/07/01/jquery-113-is-out/</guid>
		<description><![CDATA[Get it while it&#8217;s hot.
Can&#8217;t wait to update all my sites.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://groups.google.com/group/jquery-en/browse_thread/thread/d0181c1e08f256ec/94cff51a52ecc91c#94cff51a52ecc91c">Get it while it&#8217;s hot.</a><br />
Can&#8217;t wait to update all my sites.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedanglybits.com/2007/07/01/jquery-113-is-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jquery.suggest, an alternative jQuery based autocomplete library</title>
		<link>http://www.thedanglybits.com/2007/06/29/jquerysuggest-an-alternative-jquery-based-autocomplete-library/</link>
		<comments>http://www.thedanglybits.com/2007/06/29/jquerysuggest-an-alternative-jquery-based-autocomplete-library/#comments</comments>
		<pubDate>Fri, 29 Jun 2007 17:11:12 +0000</pubDate>
		<dc:creator>VulgarisOverIP</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jquery.suggest]]></category>

		<guid isPermaLink="false">http://www.vulgarisoip.com/2007/06/29/jquerysuggest-an-alternative-jquery-based-autocomplete-library/</guid>
		<description><![CDATA[Update 2: After reading Peter-Paul Koch&#8217;s amazing book on Javascript, I&#8217;ve come to realize that the offset problem with the drop down in IE is probably caused by the use of em&#8217;s on padding/margins of autocomplete&#8217;s offsetParents.
Update 1: I realize the drop down is slightly off in IE 6&#38;7, I think it has something to [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update 2: </strong>After reading <a href="http://www.quirksmode.org/">Peter-Paul Koch&#8217;s</a> <a href="http://www.amazon.com/ppk-JavaScript-1-e-VOICES/dp/0321423305/ref=pd_bbs_sr_1/105-3629605-9695644?ie=UTF8&amp;s=books&amp;qid=1186417991&amp;sr=8-1">amazing book on Javascript</a>, I&#8217;ve come to realize that the offset problem with the drop down in IE is probably caused by the use of em&#8217;s on padding/margins of autocomplete&#8217;s offsetParents.</p>
<p><strong>Update 1:</strong> I realize the drop down is slightly off in IE 6&amp;7, I think it has something to do with Wordpress or K2&#8217;s stylesheets. Also, I&#8217;m in the process of updating the script to work better when the window is resized. Keep checking back here for more updates.</p>
<p>Try it:</p>
<p><script src="http://www.vulgarisoip.com/files/jquery.js" type="text/javascript"></script><script src="http://www.vulgarisoip.com/files/jquery.suggest.js" type="text/javascript"></script><script src="http://www.vulgarisoip.com/files/jquery.dimensions.js" type="text/javascript"></script></p>
<input id="suggest" style="position: absolute" size="30" /><script type="text/javascript">// <![CDATA[
         jQuery.noConflict(); jQuery(function() {  jQuery("#suggest").suggest("http://www.vulgarisoip.com/files/search.php",{ onSelect: function() {alert("You selected: " + this.value)}}); });
// ]]&gt;</script><br />
jquery.suggest is my attempt at a jQuery autocompleter that functions much like <a href="http://www.google.com/webhp?complete=1&amp;hl=en">Google Suggest</a>. I used code and techniques from two popular jQuery autocompleters:</p>
<ul>
<li><a href="http://www.dyve.net/jquery/?autocomplete">autocomplete</a></li>
<li><a href="http://dev.jquery.com/browser/trunk/plugins/interface/iautocompleter.js">Interface autocompleter</a></li>
</ul>
<p>Originally, I used the first library in all my code but found that it just didn&#8217;t have the flexibility I needed and it had not been maintained in a long time. The biggest missing feature is the ability to run a function upon selecting something from the drop down.</p>
<p>While the Interface autocompleter seems to be rather up to date, there&#8217;s still a lot of problems with it. It&#8217;s tied to the Interface 1 library (which looks dead), the &lt;iframe&gt; code with is supposed to help cover forms in IE doesn&#8217;t work over HTTPS and the caching system is so screwed up I ended up having to manually disabling it.</p>
<p>I also found that the two implementations acted differently in different browsers including IE 6&amp;7, Firefox and Safari. Sometimes tab would select an item, sometimes it would move to the next &lt;input&gt; element. Sometimes typing in something (which I didn&#8217;t want to match) and hitting enter would submit the form as usual, sometimes it would force me to select the first match.</p>
<p>Anyways, enough complaining, here&#8217;s the feature list:</p>
<ul>
<li>Smart cache system that takes a maximum cache size in bytes and uses <a href="http://en.wikipedia.org/wiki/Cache_algorithms">MRU</a> list to discard items. Oh, and the caching works correcly.</li>
<li>Doesn&#8217;t assume that you have to choose an item from the drop down list. If an item is selected and you hit enter or tab, that item is copied to the &lt;input&gt; element. Otherwise, hitting enter or tab works just like a normal &lt;input&gt; element.</li>
<li>Event handler for selecting a drop down item.</li>
<li>Works the same in Firefox, Safari, IE 6&amp;7.</li>
</ul>
<p>It&#8217;s really easy to use, here&#8217;s the code for the suggest box above:</p>
<p><code>jQuery(function() {<br />
jQuery("#suggest").suggest("files/search.php",{<br />
onSelect: function() {alert("You selected: " + this.value)}});<br />
});</code></p>
<p>Here&#8217;s the <a href="http://www.vulgarisoip.com/files/jquery.suggest.css">stylesheet</a> and the <a href="http://www.vulgarisoip.com/files/search.phps">source</a> for the PHP file (blatantly stolen from <a href="http://www.dyve.net/jquery/?autocomplete">autocomplete</a>) which returns the items. And finally, download the source to the <a href="http://www.vulgarisoip.com/files/jquery.suggest.js">suggest library here</a>. You can find more information about possible options at the bottom of the source.</p>
<p>The only requirement is <a href="http://code.jquery.com/jquery-latest.js">jQuery</a> itself and the <a href="http://dev.jquery.com/browser/trunk/plugins/dimensions/jquery.dimensions.js">dimensions</a> plugin, although the script will try to use the <a href="http://dev.jquery.com/browser/trunk/plugins/bgiframe/jquery.bgiframe.js">bgiframe</a> plugin if possible (to fix IE 6).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedanglybits.com/2007/06/29/jquerysuggest-an-alternative-jquery-based-autocomplete-library/feed/</wfw:commentRss>
		<slash:comments>52</slash:comments>
		</item>
		<item>
		<title>Execute JavaScript injected using innerHTML attribute, even with Safari</title>
		<link>http://www.thedanglybits.com/2007/06/22/execute-javascript-injected-using-innerhtml-attribute-even-with-safari/</link>
		<comments>http://www.thedanglybits.com/2007/06/22/execute-javascript-injected-using-innerhtml-attribute-even-with-safari/#comments</comments>
		<pubDate>Sat, 23 Jun 2007 06:39:46 +0000</pubDate>
		<dc:creator>VulgarisOverIP</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.vulgarisoip.com/2007/06/22/execute-javascript-injected-using-innerhtml-attribute-even-with-safari/</guid>
		<description><![CDATA[A common AJAX technique is to return straight HTML and use the innerHTML element attribute to insert it into the DOM. Unfortunately, JavaScript inserted into the DOM this way (inside a &#60;script&#62; tag) will not execute in all browsers.
I found this out when trying to implement a dynamically changing PlotKit graph on my companies intranet [...]]]></description>
			<content:encoded><![CDATA[<p>A common AJAX technique is to return straight HTML and use the innerHTML element attribute to insert it into the DOM. Unfortunately, JavaScript inserted into the DOM this way (inside a &lt;script&gt; tag) will not execute in all browsers.</p>
<p>I found this out when trying to implement a dynamically changing <a href="http://www.liquidx.net/plotkit/">PlotKit</a> graph on my companies intranet site. It worked in Firefox (of course) and IE was coaxed into working be <a href="http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/properties/innerhtml.asp">using the DEFER attribute</a>. But the best Safari could do was leave a big blank space where my beautiful graph should be. Even though there was probably only one other employee that used Safari, I knew there was no way this was going to stand. There must be a solution, right?</p>
<p>Some googling turned up <a href="http://groups.google.com/group/comp.lang.javascript/browse_thread/thread/1ff1571335298030/9150ad93b408065c?lnk=st&amp;q=safari+innerhtml+script+element&amp;rnum=5&amp;hl=en#9150ad93b408065c">this posting</a>, where the problem was solved using a combination of cloneNode(), innerHTML and appendChild(). Fancy. It works with Opera and IE, <strong>but not with Safari</strong>.</p>
<p>Then, my eureka moment came. I replaced the &lt;script&gt; tag in the RPC with a &lt;div class=&#8221;javacript&#8221;&gt; tag, still keeping all the script inside the &lt;div&gt;. Next, I added <code>.javascript { display: none; }</code> to the style sheet and did some jQuery magic:</p>
<p><code>$('#ajaxLoading').ajaxStop(function() {<br />
$('.javascript').each(function() {<br />
eval($(this).text());<br />
});<br />
});</code></p>
<p>This simple function runs every time an AJAX call is completed and uses eval() to manually run the JavaScript. It&#8217;s ugly, it&#8217;s probably violating some sort of standard, but guess what? <strong>It works in Safari</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedanglybits.com/2007/06/22/execute-javascript-injected-using-innerhtml-attribute-even-with-safari/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
