<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>mysiteonline™ - Programming</title>
    <link>http://life.mysiteonline.org/</link>
    <description>Brendon Kozlowski's Home on the Web.</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.5.4 - http://www.s9y.org/</generator>
    <pubDate>Mon, 17 Oct 2011 15:08:05 GMT</pubDate>

    <image>
        <url>http://life.mysiteonline.org/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: mysiteonline™ - Programming - Brendon Kozlowski's Home on the Web.</title>
        <link>http://life.mysiteonline.org/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>htmlentities() in PHP is Your Friend</title>
    <link>http://life.mysiteonline.org/archives/204-htmlentities-in-PHP-is-Your-Friend.html</link>
            <category>PHP</category>
    
    <comments>http://life.mysiteonline.org/archives/204-htmlentities-in-PHP-is-Your-Friend.html#comments</comments>
    <wfw:comment>http://life.mysiteonline.org/wfwcomment.php?cid=204</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://life.mysiteonline.org/rss.php?version=2.0&amp;type=comments&amp;cid=204</wfw:commentRss>
    

    <author>nospam@example.com (Brendon Kozlowski)</author>
    <content:encoded>
    After constantly badgering a certain library calendar vendor over 2 years to fix his software&#039;s RSS feed charset issues. Personally I don&#039;t think getting raw text describing times in the form of &quot;6:30â€“8:30 p.m.&quot; is all that valuable...that&#039;s just a single example. The calendar website declared no charset information. I have no idea what charset the database is in, and the RSS feed was declared as ISO-8859-1. Our website, database, and everything else was declared as UTF-8, not that it really mattered though since the raw incoming text from the RSS feed was all garbled to begin with.&lt;br /&gt;
&lt;br /&gt;
Every once and awhile I&#039;d randomly try to find an answer to the problem. I&#039;ve been through using all sorts of different algorithms to solve the problem. None of them seemed to work, until one day I saw someone mention on StackOverflow (unfortunately I&#039;ve lost the link) that he tried using htmlentities() to solve his problem and it worked. I thought, &quot;It couldn&#039;t be that simple...&quot; However, I had nothing to lose and tested it. It worked. (What???) I still don&#039;t know why or how htmlentities managed to run a translation table on the garbled input to output the appropriate values, but I&#039;m happy! Even my attempts at REGEX were unsuccessful, though I probably was just unable to find ALL the right bit-level character code sequences needed. Apparently the translation table that htmlentities uses is pretty darn thorough! Thanks, PHP team!&lt;br /&gt;
&lt;br /&gt;
Okay, so that was the first use of htmlentities(). The second one?&lt;br /&gt;
&lt;br /&gt;
I realized I overlooked a severe security hole in my forms. When users did not provide correct details in their forms, I was simply reinserting the values they provided back in to the HTML form&#039;s VALUE tag (or in the case of a textarea, just rendering the value between the tags). For some reason this didn&#039;t strike me as being severely stupid at the time. I don&#039;t know why. I guess the &quot;never reprint what your users submit to you&quot; only made me think of &quot;back to the DOM&quot; - but only outside form elements. Who knows why. This let someone who actually put some (minimal) thought into it to run whatever PHP code they wanted simply by submitting a form without all required data. Escape the form element by using a standard HTML closing tag, then start writing the PHP. If you wanted valid HTML, just make sure to also include a dummy HTML input or textarea field once done. Simple. (Note: I am also in the process of re-examining CHMOD values of files and folders.)&lt;br /&gt;
&lt;br /&gt;
When I went back to &quot;fix&quot; my stupidity, I also initially thought of using PHP&#039;s filter functions. Although they worked, they also would sometimes (depending on user input) remove certain characters. Like a bolt of lightning (while I was eating lunch) it came to me. I just used htmlentities(), why not just use it again? ...so I did. Now my forms are a bit more protected &lt;strong&gt;and&lt;/strong&gt; our RSS feed is no longer displaying obnoxious characters to visitors due to the encoding mishaps of an external developer.&lt;br /&gt;
&lt;br /&gt;
Sometimes PHP&#039;s little gems are so awesome... 
    </content:encoded>

    <pubDate>Fri, 14 Oct 2011 12:11:40 -0700</pubDate>
    <guid isPermaLink="false">http://life.mysiteonline.org/archives/204-guid.html</guid>
    
</item>
<item>
    <title>Outlook Web Access (Exchange) with PHP and cURL</title>
    <link>http://life.mysiteonline.org/archives/165-Outlook-Web-Access-Exchange-with-PHP-and-cURL.html</link>
            <category>PHP</category>
    
    <comments>http://life.mysiteonline.org/archives/165-Outlook-Web-Access-Exchange-with-PHP-and-cURL.html#comments</comments>
    <wfw:comment>http://life.mysiteonline.org/wfwcomment.php?cid=165</wfw:comment>

    <slash:comments>10</slash:comments>
    <wfw:commentRss>http://life.mysiteonline.org/rss.php?version=2.0&amp;type=comments&amp;cid=165</wfw:commentRss>
    

    <author>nospam@example.com (Brendon Kozlowski)</author>
    <content:encoded>
    I needed a way to authenticate users from our library from a server &lt;em&gt;outside&lt;/em&gt; our network, and therefore also not connected to Active Directory.  At first I was thinking LDAP would be the best way...then I did my research and learned enough about LDAP to realize just how much information it gives out - WAY too much for it to be very secure.  Even if I used SSL, created an account specifically for this access, set that account to read only...all it would take would be one person to hack our server and grab that information and all our organization&#039;s data is out there.  Although it&#039;s about as much of a chance as getting hit by lightning in the middle of the desert in a sand storm, I wouldn&#039;t want to be responsible.&lt;br /&gt;
&lt;br /&gt;
The only server with any sort of external web presence that is also touching the internet is our Exchange server&#039;s web access portal.  I thought, &quot;Ah HA! I can use cURL, or streams, or fsockopen or something to fake a login to this page to verify authentication!&quot;  After searching a bit (I&#039;m terrible every time I attempt to write something using cURL to authenticate), I came across a few things.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Exchange Server 2007 uses SOAP to provide a web service...AWESOME!  We currently use 2003 though, but we will be upgrading later this year, so this may be helpful later on. &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/aa579187.aspx&quot;&gt;[Link]&lt;/a&gt;&lt;ol type=&quot;a&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://www.howtoforge.com/talking-soap-with-exchange&quot;&gt;HowToForge article on how to use PHP with 2007&#039;s SOAP Web Service&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt;I found &lt;a href=&quot;http://web.archive.org/web/20090125160119/http://cadmuslabs.net/index.php?entry=entry081230-075614&quot;&gt;this PHP script&lt;/a&gt; that I tested, which successfully contacted our OWA server and authenticated.&lt;/li&gt;&lt;li&gt;I also found a PHP class on &lt;a href=&quot;http://code.google.com/p/tylerhall/source/browse/trunk/outlook-web-access/owa.php&quot;&gt;Google Code&lt;/a&gt; from Tyler Hall - it&#039;s not any particular project repository, just miscellaneous code he&#039;s hosting.  It looks like it&#039;s slightly more feature rich, allowing info from address books and a user&#039;s inbox, for example.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;
&lt;br /&gt;
I only needed to authenticate our building, so thankfully we had our own subdomain (not sure of the proper terminology) in the AD...  If your domain was example.com (DC=example,DC=com), just getting OUR office (assume &quot;Office1&quot;) was as easy as defining office1.example.com (DC=office1,DC=example,DC=com) after the @ symbol in the user&#039;s username (typically unnecessary information with OWA, but adding it explicitly was important here).  It (seemingly) worked perfectly.&lt;br /&gt;
&lt;br /&gt;
If you plan on doing something similar, just make sure that you cache (and encrypt) username/password information locally, hitting the OWA page continuously would probably make your System (or Email) Administrators a little unhappy with you. 
    </content:encoded>

    <pubDate>Fri, 13 Mar 2009 10:43:40 -0700</pubDate>
    <guid isPermaLink="false">http://life.mysiteonline.org/archives/165-guid.html</guid>
    
</item>
<item>
    <title>Disable the Security Component in CakePHP only for Certain Actions</title>
    <link>http://life.mysiteonline.org/archives/175-Disable-the-Security-Component-in-CakePHP-only-for-Certain-Actions.html</link>
            <category>PHP</category>
    
    <comments>http://life.mysiteonline.org/archives/175-Disable-the-Security-Component-in-CakePHP-only-for-Certain-Actions.html#comments</comments>
    <wfw:comment>http://life.mysiteonline.org/wfwcomment.php?cid=175</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>http://life.mysiteonline.org/rss.php?version=2.0&amp;type=comments&amp;cid=175</wfw:commentRss>
    

    <author>nospam@example.com (Brendon Kozlowski)</author>
    <content:encoded>
    As I&#039;m working on a desktop application that needs to connect to the database backend, and CakePHP provides an awesome mechanism for REST or AJAX communication (as well as data validation), I decided to have my desktop application talk directly through the Cake interface to do its magic.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, I was also using CakePHP&#039;s rather secure Security component to prevent XSS/CSRF attacks.  The problem is that because the desktop application was directly accessing the method with data and bypassing CakePHP&#039;s FormHelper automatically created (and Security Component friendly) rendered HTML, it was failing (and because it wouldn&#039;t even get to the action since the Security Component was set in the AppController, I couldn&#039;t even use $this-&gt;log($this, LOG_DEBUG) to see what was happening).&lt;br /&gt;
&lt;br /&gt;
After searching for a good 30 minutes or so, I came across &lt;a href=&quot;http://n2.nabble.com/how-to-disable-security-component-for-a-single-action-td682715.html&quot;&gt;this archived Google Group post&lt;/a&gt; by franky06l:&lt;br /&gt;
&lt;textarea name=&quot;code&quot; class=&quot;php&quot;&gt;if(isset($this-&gt;Security) &amp;&amp;amp; $this-&gt;action == &#039;myaction&#039;))
     $this-&gt;Security-&gt;enabled = false;&lt;/textarea&gt;I updated this to only be used in my specific controller&#039;s action, as so:&lt;br /&gt;
&lt;textarea name=&quot;code&quot; class=&quot;php&quot;&gt;function beforeFilter(){
	parent::beforeFilter();
	if(isset($this-&gt;Security) &amp;&amp;amp; $this-&gt;RequestHandler-&gt;isAjax() &amp;&amp;amp; $this-&gt;action == &#039;add&#039;){
 		$this-&gt;Security-&gt;enabled = false; 
	}
}&lt;/textarea&gt;Voila!  It now works as expected.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Note:&lt;/strong&gt; One will need to be extra cautious when disabling the Security Component.  The Security Component takes care of a lot of issues for us automatically, by disabling it, you&#039;re opening yourself up to some possible troubles.  Extra precaution is recommended, and I relinquish myself from any use of the above code that may cause harm - use at your own peril (or absolute need)!  :D 
    </content:encoded>

    <pubDate>Wed, 26 Aug 2009 12:58:35 -0700</pubDate>
    <guid isPermaLink="false">http://life.mysiteonline.org/archives/175-guid.html</guid>
    
</item>
<item>
    <title>jQuery and Google Analytics: Take 2</title>
    <link>http://life.mysiteonline.org/archives/203-jQuery-and-Google-Analytics-Take-2.html</link>
            <category>Programming</category>
    
    <comments>http://life.mysiteonline.org/archives/203-jQuery-and-Google-Analytics-Take-2.html#comments</comments>
    <wfw:comment>http://life.mysiteonline.org/wfwcomment.php?cid=203</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://life.mysiteonline.org/rss.php?version=2.0&amp;type=comments&amp;cid=203</wfw:commentRss>
    

    <author>nospam@example.com (Brendon Kozlowski)</author>
    <content:encoded>
    Awhile back I had &lt;a href=&quot;http://life.mysiteonline.org/archives/174-Using-jQuery-and-Google-Analytics-to-track-Outbound-Clicks.html&quot;&gt;reported on my findings&lt;/a&gt; of how to use jQuery to automatically tag links on my site (that link to a site that is not my own) for event tracking with Google Analytics.&lt;br /&gt;
&lt;br /&gt;
Although there are ways to use the pageView method and parse the data within Analytics so that it does not skew your view of overall visits/hits, I simply find it easier to mark these as events since they aren&#039;t actually page views, but events.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, it&#039;s helpful to see which external links are pertinent to people, and which page they&#039;re leaving your site from (and where they&#039;re going), so rather than identifying the event type itself (click), I used that field for a value instead so it could be categorized by any of these things from within Google Analytics.&lt;br /&gt;
&lt;br /&gt;
The problem I was having personally was that the values I was using were not strings (in my own tests at least; the code on the blog should have worked, theoretically). I was using document.location (type: object) and passing it to the trackEvent() method, which checks for value types (and denies incorrect calls). Here is the updated (using the new Async method) code which is tested, and works:&lt;br /&gt;
&lt;br /&gt;
&lt;textarea name=&quot;code&quot; class=&quot;javascript&quot;&gt;  &lt;script type=&quot;text/javascript&quot;&gt;
    var _gaq = _gaq || [];
    _gaq.push([&#039;_setAccount&#039;, &#039;UA-XXXXXX-1&#039;]);
    _gaq.push([&#039;_trackPageview&#039;]); //track this pages view

    (function() {
      var ga = document.createElement(&#039;script&#039;); ga.type = &#039;text/javascript&#039;; ga.async = true;
      ga.src = (&#039;https:&#039; == document.location.protocol ? &#039;https://ssl&#039; : &#039;http://www&#039;) + &#039;.google-analytics.com/ga.js&#039;;
      var s = document.getElementsByTagName(&#039;script&#039;)[0]; s.parentNode.insertBefore(ga, s);
    })();

    //the above code is Google&#039;s default code, below is my addition (using jQuery)
    $(document).ready(function(){
      var domain = document.location.host; //includes port if exists, whereas hostname does not
      var curPage = document.location.href;
      $(&#039;a[href^=&quot;http&quot;]:not([href*=&quot;&#039;+domain+&#039;&quot;])&#039;).each(function(){
        //track the events (string unless noted): 1st = method, 2nd = category, 3rd = action, 4th = label, 5th = (int)value
        //http://code.google.com/apis/analytics/docs/tracking/eventTrackerGuide.html
        $(this).click(function(){
          //track an outbound link-click event
          _gaq.push([&#039;_trackEvent&#039;, &#039;Outbound&#039;, curPage, $(this).attr(&#039;href&#039;)]);
        });
      });
    });
  &lt;/script&gt;&lt;/textarea&gt;&lt;br /&gt;
Remember to change your own account ID in the code above!&lt;br /&gt;
&lt;br /&gt;
There is no need to define your domain&#039;s actual information anywhere unless you want to track both subdomains as well as top-level domains under a single account. For that, take a look at the Google Analytics documentation. I haven&#039;t done this myself so would not be able to suggest a best-method approach for it. This code tracks any HTML-based links (links inserted dynamically with JS will not be tracked, you can do this with $(this).live(&#039;click&#039;, function()...) instead of $(this).click()) that point to anywhere NOT within your domain. If you use a redirect script as part of your domain, (ex: ...tracker.php?go=http://someothersite.com), then this will not track that page click as-is.&lt;br /&gt;
&lt;br /&gt;
This code specifically defines the event as &quot;Outbound&quot;, the category as the currently viewed page&#039;s URL, and the action field as the URL that the user will be taken to. Modify &#039;til your heart&#039;s content. :)&lt;br /&gt;
&lt;br /&gt;
For even more accurate results, see how to delay the loading of the external site so that the tracking code has more time to accomplish its task (race conditions are fun): &lt;a href=&quot;http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&amp;answer=55527&quot;&gt;Google&#039;s Solution&lt;/a&gt; 
    </content:encoded>

    <pubDate>Thu, 09 Dec 2010 12:30:46 -0800</pubDate>
    <guid isPermaLink="false">http://life.mysiteonline.org/archives/203-guid.html</guid>
    
</item>
<item>
    <title>Finding all application Controllers in CakePHP (v1.3.x)</title>
    <link>http://life.mysiteonline.org/archives/201-Finding-all-application-Controllers-in-CakePHP-v1.3.x.html</link>
            <category>PHP</category>
    
    <comments>http://life.mysiteonline.org/archives/201-Finding-all-application-Controllers-in-CakePHP-v1.3.x.html#comments</comments>
    <wfw:comment>http://life.mysiteonline.org/wfwcomment.php?cid=201</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://life.mysiteonline.org/rss.php?version=2.0&amp;type=comments&amp;cid=201</wfw:commentRss>
    

    <author>nospam@example.com (Brendon Kozlowski)</author>
    <content:encoded>
    At some point in time you may find the need to get a list of all of the controllers within your application. It&#039;s actually quite simple so long as you don&#039;t need controllers from any plugins.&lt;br /&gt;
&lt;textarea name=&quot;code&quot; class=&quot;php&quot;&gt;    function listControllers() {
        $controllers = App::objects(&#039;controller&#039;);
        $controllers = array_diff($controllers, array(&#039;App&#039;, &#039;Pages&#039;));

        pr($controllers);die();
    }&lt;/textarea&gt;&lt;br /&gt;
Place this code in any of your controllers and view it from the web (for instance, from the Users Controller): http://www.example.com/users/listControllers&lt;br /&gt;
&lt;br /&gt;
You&#039;ll see something similar to the following:&lt;br /&gt;
&lt;textarea name=&quot;code&quot; class=&quot;php&quot;&gt;Array
(
    [2] =&gt; Comments
    [3] =&gt; Posts
    [4] =&gt; Tags
    [5] =&gt; Users
)&lt;/textarea&gt;&lt;br /&gt;
The &lt;a href=&quot;http://api.cakephp.org/class/app#method-Appobjects&quot;&gt;App::objects()&lt;/a&gt; method returns an array of objects of the given type, such as: &#039;model&#039;, &#039;controller&#039;, &#039;helper&#039;, or &#039;plugin&#039; - it also accepts other parameters, such as &quot;path&quot; in case you do eventually need to check controllers for your plugins.&lt;br /&gt;
&lt;br /&gt;
The array_diff() is there as a much simpler method to remove the AppController and PagesController from the returned results as they would most likely exist in your application regardless and aren&#039;t normally something you&#039;d need to worry about with ACL as there are other means within Cake to handle access to them. You&#039;ll notice that array_diff doesn&#039;t return an array starting at index of 0 since it removes keys from the original array too. That shouldn&#039;t be a problem, but if it is you can always use a loop instead of array_diff() and just unset or splice the matching values.&lt;br /&gt;
&lt;br /&gt;
I used the CakePHP convenience method of pr() (print_r surrounded by PRE tags), and a die() simply to show the returned results and print them to the screen. You&#039;d probably prefer to double underscore the function name (__listControllers()) to make it a private method to the class (rather than publicly viewable via the web), and change pr() to &lt;strong&gt;return&lt;/strong&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;What&#039;s the purpose of this?&lt;/strong&gt;&lt;br /&gt;
- Maybe you&#039;d want to create a web interface for ACL and need to know which controllers to give/deny access to/from&lt;br /&gt;
- Maybe you want to create a navigation menu based on your controllers&lt;br /&gt;
...maybe you can think of something that I can&#039;t. :)&lt;br /&gt;
&lt;br /&gt;
Alter to your own tastes. This is only a starting point.&lt;br /&gt;
&lt;br /&gt;
Other useful links (check version compatibility in these resources):&lt;br /&gt;
&lt;a href=&quot;http://debuggable.com/posts/quick-dessert-list-all-controllers-of-a-cakephp-application:480f4dd6-adf4-4b18-9fe8-4b99cbdd56cb&quot;&gt;Quick dessert: List all controllers of a CakePHP application&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://bakery.cakephp.org/articles/view/automatically-load-all-controllers-and-actions-into-aco-tables-for-acl-with-a-cakephp-task&quot;&gt;Automatically load all controllers and actions into ACO tables for ACL with a CakePHP Task&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers/&quot;&gt;How to list all controllers&lt;/a&gt; 
    </content:encoded>

    <pubDate>Tue, 28 Sep 2010 14:08:52 -0700</pubDate>
    <guid isPermaLink="false">http://life.mysiteonline.org/archives/201-guid.html</guid>
    
</item>
<item>
    <title>jQuery: Edit Content Inline on Dynamically Created Elements</title>
    <link>http://life.mysiteonline.org/archives/199-jQuery-Edit-Content-Inline-on-Dynamically-Created-Elements.html</link>
            <category>Programming</category>
    
    <comments>http://life.mysiteonline.org/archives/199-jQuery-Edit-Content-Inline-on-Dynamically-Created-Elements.html#comments</comments>
    <wfw:comment>http://life.mysiteonline.org/wfwcomment.php?cid=199</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://life.mysiteonline.org/rss.php?version=2.0&amp;type=comments&amp;cid=199</wfw:commentRss>
    

    <author>nospam@example.com (Brendon Kozlowski)</author>
    <content:encoded>
    Unless you&#039;ve been living under a rock while learning jQuery, everyone should have learned of the .live() call within the jQuery JavaScript toolkit. If you haven&#039;t, shove that rock aside - the .live() method takes the place of bind() (which is the more powerful, and base method of .click(), .blur(), etc...) for elements that are created dynamically at runtime. If you dynamically create elements after the DOM has loaded, and assume generalized JavaScript functions you&#039;ve written to target these new elements (we&#039;ll presume you&#039;re targeting a &quot;findMe&quot; class) will work. Well it won&#039;t, unless you use .live().&lt;br /&gt;
&lt;br /&gt;
Now that we have that out of the way, another one of jQuery&#039;s really great features that mimics why Wordpress is so great - all of the user contributed plugins, whether they&#039;re efficient or not, the fact that someone else has already created a solution for you, and is willing to share it with you (most likely for free) is awesome. One such type of plugin that I was looking for today, and knew I&#039;d want to eventually use at some point, was an edit-in-place, or inline edit plugin - something that allowed me to edit content from within the DOM, such as in a DIV container (not in a textbox - or at least not initially rendered in one) dynamically.&lt;br /&gt;
&lt;br /&gt;
In my case today, I was experimenting with dynamically creating elements that might need to be edited after being created. My first gut-instinct thought? Yup, you guessed it: .live(). I replaced the call to .bind() in &lt;a href=&quot;http://arashkarimzadeh.com/index.php/jquery/7-editable-jquery-plugin.html&quot;&gt;the plugin&lt;/a&gt;&#039;s source and voilà! Nothing. It didn&#039;t work. The jQuery code in the plugin had been optimized beyond a point where I was comfortable to modify it further and understand what I was doing in order to make it work (which was kind of pathetic, but I digress).&lt;br /&gt;
&lt;br /&gt;
So, how could I solve my little problem?  Quite easily - I wasn&#039;t really thinking.&lt;br /&gt;
&lt;br /&gt;
The call to instantiate an event on targeted objects after the DOM is ready is something like this:&lt;br /&gt;
&lt;textarea name=&quot;code&quot; class=&quot;javascript&quot;&gt;$(&#039;div.editable&#039;).editable();&lt;/textarea&gt;I was scratching my head, trying to figure out if I&#039;d have to uninstantiate all elements and reinstantiate the event bubbling throughout the DOM each time I created a dynamically created element. I was over-thinking it. Instead, all I had to do was create the event on that newly created element on the element&#039;s creation itself. Ooh, hard. I know, I know - I&#039;m brilliant!&lt;br /&gt;
&lt;br /&gt;
jQuery v1.4+ example code:&lt;br /&gt;
&lt;textarea name=&quot;code&quot; class=&quot;javascript&quot;&gt;var pickSummary = $(&#039;&lt;div&gt;&#039;, {&#039;text&#039;: &#039;Hello World!&#039;}).addClass(&#039;editable&#039;).appendTo($(&#039;body&#039;)).editable({type:&#039;textarea&#039;});&lt;/textarea&gt;Easy and simple.&lt;br /&gt;
You can see how to further use and extend Arash Karimzadeh&#039;s jQuery &lt;a href=&quot;http://arashkarimzadeh.com/index.php/jquery/7-editable-jquery-plugin.html&quot;&gt;Editable plugin&lt;/a&gt;, or if you&#039;d prefer a more popular plugin for inline editing with jQuery, there&#039;s also Mika Tuupola&#039;s &lt;a href=&quot;http://www.appelsiini.net/projects/jeditable&quot;&gt;Jeditable&lt;/a&gt; plugin. According to the comments Mika intends to add .live() support soon, but until he does this should work just fine.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;&lt;strong&gt;&quot;Why did you choose Editable over Jeditable if Jeditable is more popular?&quot;&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;
In this specific case I didn&#039;t want to submit anything back to the server on edit, and it seemed like Jeditable was all about saving back to a data store somewhere. Editable just seemed simpler for what I was working on at the moment.&lt;br /&gt;
&lt;br /&gt;
Happy programming! 
    </content:encoded>

    <pubDate>Thu, 22 Jul 2010 12:34:48 -0700</pubDate>
    <guid isPermaLink="false">http://life.mysiteonline.org/archives/199-guid.html</guid>
    
</item>

</channel>
</rss>
