<?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: Cross-browser AJAX updates to table elements</title>
	<atom:link href="http://ramblings.gibberishcode.net/archives/cross-browser-ajax-updates-to-table-elements/9/feed" rel="self" type="application/rss+xml" />
	<link>http://ramblings.gibberishcode.net/archives/cross-browser-ajax-updates-to-table-elements/9</link>
	<description>about fetching, interpreting, and executing.</description>
	<lastBuildDate>Mon, 14 Jun 2010 22:21:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: mark valles</title>
		<link>http://ramblings.gibberishcode.net/archives/cross-browser-ajax-updates-to-table-elements/9/comment-page-1#comment-6522</link>
		<dc:creator>mark valles</dc:creator>
		<pubDate>Fri, 20 Feb 2009 05:41:54 +0000</pubDate>
		<guid isPermaLink="false">http://ramblings.gibberishcode.net/?p=9#comment-6522</guid>
		<description>i mean...

Say you get HTML string like this returned from the server:

“&lt;div&gt;Here’s the list: &lt;ul&gt;&lt;li&gt;item1&lt;/li&gt;&lt;li&gt;item2&lt;/li&gt;  &lt;/ul&gt;&lt;/div&gt;″

Calling it would simply be like this:

var eAlertMsg = document.getElementById(’alertMsg’);
$(eAlertMsg).injectHTML( “&lt;div&gt;Here’s the list: &lt;ul&gt;&lt;li&gt;item1&lt;/li&gt;&lt;li&gt;item2&lt;/li&gt;  &lt;/ul&gt;&lt;/div&gt;″, “div” );</description>
		<content:encoded><![CDATA[<p>i mean&#8230;</p>
<p>Say you get HTML string like this returned from the server:</p>
<p>“&lt;div&gt;Here’s the list: &lt;ul&gt;&lt;li&gt;item1&lt;/li&gt;&lt;li&gt;item2&lt;/li&gt;  &lt;/ul&gt;&lt;/div&gt;″</p>
<p>Calling it would simply be like this:</p>
<p>var eAlertMsg = document.getElementById(’alertMsg’);<br />
$(eAlertMsg).injectHTML( “&lt;div&gt;Here’s the list: &lt;ul&gt;&lt;li&gt;item1&lt;/li&gt;&lt;li&gt;item2&lt;/li&gt;  &lt;/ul&gt;&lt;/div&gt;″, “div” );</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mark valles</title>
		<link>http://ramblings.gibberishcode.net/archives/cross-browser-ajax-updates-to-table-elements/9/comment-page-1#comment-6521</link>
		<dc:creator>mark valles</dc:creator>
		<pubDate>Fri, 20 Feb 2009 05:35:07 +0000</pubDate>
		<guid isPermaLink="false">http://ramblings.gibberishcode.net/?p=9#comment-6521</guid>
		<description>Here&#039;s a better one...

    Element.implement({
        /**
         *  Here&#039;s how you do innerHTML with ie6 on mootools.1.2 framework - moerk
         *           
         *  @params String htmlContent - A string representation of raw HTML which is about to be created.
         *  @params String wrapperTagName - htmlContent must have some sort of wrapper tag which holds the rest of html content.
         *  @returns Object - Converted html objects      
         */ 
        injectHTML: function( htmlContent, wrapperTagName ){
            var x = new Element(&#039;div&#039;, {html: htmlContent}).getElement( wrapperTagName );
            this.empty();
            x.inject( this );
        } 
    });


Say you get HTML string like this returned from the server: 

&quot;Here&#039;s the list:item1item2&quot;

Calling it would simply be like this:

var eAlertMsg = document.getElementById(&#039;alertMsg&#039;);
$(eAlertMsg).injectHTML( &quot;Here&#039;s the list:item1item2&quot;, &quot;div&quot; );</description>
		<content:encoded><![CDATA[<p>Here&#8217;s a better one&#8230;</p>
<p>    Element.implement({<br />
        /**<br />
         *  Here&#8217;s how you do innerHTML with ie6 on mootools.1.2 framework &#8211; moerk<br />
         *<br />
         *  @params String htmlContent &#8211; A string representation of raw HTML which is about to be created.<br />
         *  @params String wrapperTagName &#8211; htmlContent must have some sort of wrapper tag which holds the rest of html content.<br />
         *  @returns Object &#8211; Converted html objects<br />
         */<br />
        injectHTML: function( htmlContent, wrapperTagName ){<br />
            var x = new Element(&#8216;div&#8217;, {html: htmlContent}).getElement( wrapperTagName );<br />
            this.empty();<br />
            x.inject( this );<br />
        }<br />
    });</p>
<p>Say you get HTML string like this returned from the server: </p>
<p>&#8220;Here&#8217;s the list:item1item2&#8243;</p>
<p>Calling it would simply be like this:</p>
<p>var eAlertMsg = document.getElementById(&#8216;alertMsg&#8217;);<br />
$(eAlertMsg).injectHTML( &#8220;Here&#8217;s the list:item1item2&#8243;, &#8220;div&#8221; );</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mark valles</title>
		<link>http://ramblings.gibberishcode.net/archives/cross-browser-ajax-updates-to-table-elements/9/comment-page-1#comment-6520</link>
		<dc:creator>mark valles</dc:creator>
		<pubDate>Fri, 20 Feb 2009 05:21:22 +0000</pubDate>
		<guid isPermaLink="false">http://ramblings.gibberishcode.net/?p=9#comment-6520</guid>
		<description>Here&#039;s to make things a bit easier...

    Element.implement({
        /**
         *  Here&#039;s how you do innerHTML with ie6 on mootools.1.2 framework
         *           
         *  @params String htmlContent - A string representation of raw HTML which is about to be created.
         *  @params String wrapperTagName - htmlContent must have some sort of wrapper tag which holds the rest of html content.
         *  @returns Object - Converted html objects      
         */ 
        injectHTML: function( htmlContent, wrapperTagName ){
            var x = new Element(&#039;div&#039;, {html: htmlContent}).getElement( wrapperTagName );
            x.inject( this );
        } 
    });</description>
		<content:encoded><![CDATA[<p>Here&#8217;s to make things a bit easier&#8230;</p>
<p>    Element.implement({<br />
        /**<br />
         *  Here&#8217;s how you do innerHTML with ie6 on mootools.1.2 framework<br />
         *<br />
         *  @params String htmlContent &#8211; A string representation of raw HTML which is about to be created.<br />
         *  @params String wrapperTagName &#8211; htmlContent must have some sort of wrapper tag which holds the rest of html content.<br />
         *  @returns Object &#8211; Converted html objects<br />
         */<br />
        injectHTML: function( htmlContent, wrapperTagName ){<br />
            var x = new Element(&#8216;div&#8217;, {html: htmlContent}).getElement( wrapperTagName );<br />
            x.inject( this );<br />
        }<br />
    });</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Recent Faves Tagged With "crossbrowser" : MyNetFaves</title>
		<link>http://ramblings.gibberishcode.net/archives/cross-browser-ajax-updates-to-table-elements/9/comment-page-1#comment-139</link>
		<dc:creator>Recent Faves Tagged With "crossbrowser" : MyNetFaves</dc:creator>
		<pubDate>Wed, 03 Dec 2008 08:35:19 +0000</pubDate>
		<guid isPermaLink="false">http://ramblings.gibberishcode.net/?p=9#comment-139</guid>
		<description>[...] ago      A Cross-Browser, Bookmarklet Speed Reader First saved by bleulayette &#124; 19 days ago      Cross-browser AJAX updates to table elements First saved by jpojman &#124; 20 days ago      HOW TO make web pages “cross browser” First saved by [...]</description>
		<content:encoded><![CDATA[<p>[...] ago      A Cross-Browser, Bookmarklet Speed Reader First saved by bleulayette | 19 days ago      Cross-browser AJAX updates to table elements First saved by jpojman | 20 days ago      HOW TO make web pages “cross browser” First saved by [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Kassens</title>
		<link>http://ramblings.gibberishcode.net/archives/cross-browser-ajax-updates-to-table-elements/9/comment-page-1#comment-37</link>
		<dc:creator>Jan Kassens</dc:creator>
		<pubDate>Sat, 27 Sep 2008 19:22:45 +0000</pubDate>
		<guid isPermaLink="false">http://ramblings.gibberishcode.net/?p=9#comment-37</guid>
		<description>MooTools 1.2.1 will likely include a fix for set(&#039;html&#039;, str) on all elements in IE. (table stuff, and select elements)

- jan</description>
		<content:encoded><![CDATA[<p>MooTools 1.2.1 will likely include a fix for set(&#8216;html&#8217;, str) on all elements in IE. (table stuff, and select elements)</p>
<p>- jan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Aufreiter</title>
		<link>http://ramblings.gibberishcode.net/archives/cross-browser-ajax-updates-to-table-elements/9/comment-page-1#comment-30</link>
		<dc:creator>Michael Aufreiter</dc:creator>
		<pubDate>Tue, 02 Sep 2008 21:45:01 +0000</pubDate>
		<guid isPermaLink="false">http://ramblings.gibberishcode.net/?p=9#comment-30</guid>
		<description>sure you are right. I&#039;m aware of that and my intension is not to &quot;pollute&quot; the framework itself, but in this specific case I&#039;ve come to the conclusion that there is something missing. IMO it&#039;s a very common use-case to apply server-generated html to the page, and the need for a fake element in order to convert a html-fragment to a DOM Element feels unnatural to me.

I created a post at the mootools newsgroup looking for a mootools equivalent for Prototype&#039;s Element.replace method (with deals with HTML directly) that does exactly that in a straight-forward way without all the hassles.

here&#039;s the link: http://groups.google.com/group/mootools-users/browse_thread/thread/1dffe721ee0e8c1c/184c0d22e0a684b6?hl=en&amp;lnk=gst&amp;q=Element.replace#184c0d22e0a684b6

I&#039;m fine with the mootools way, using DOM Elements through-out the framework, as long as there is a simple way to get this desired DOM Elements. ;-)

I would definitely vote for a HTML to DOM-Elements functionality in mootools-core...</description>
		<content:encoded><![CDATA[<p>sure you are right. I&#8217;m aware of that and my intension is not to &#8220;pollute&#8221; the framework itself, but in this specific case I&#8217;ve come to the conclusion that there is something missing. IMO it&#8217;s a very common use-case to apply server-generated html to the page, and the need for a fake element in order to convert a html-fragment to a DOM Element feels unnatural to me.</p>
<p>I created a post at the mootools newsgroup looking for a mootools equivalent for Prototype&#8217;s Element.replace method (with deals with HTML directly) that does exactly that in a straight-forward way without all the hassles.</p>
<p>here&#8217;s the link: <a href="http://groups.google.com/group/mootools-users/browse_thread/thread/1dffe721ee0e8c1c/184c0d22e0a684b6?hl=en&amp;lnk=gst&amp;q=Element.replace#184c0d22e0a684b6" rel="nofollow">http://groups.google.com/group/mootools-users/browse_thread/thread/1dffe721ee0e8c1c/184c0d22e0a684b6?hl=en&amp;lnk=gst&amp;q=Element.replace#184c0d22e0a684b6</a></p>
<p>I&#8217;m fine with the mootools way, using DOM Elements through-out the framework, as long as there is a simple way to get this desired DOM Elements. <img src='http://ramblings.gibberishcode.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>I would definitely vote for a HTML to DOM-Elements functionality in mootools-core&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://ramblings.gibberishcode.net/archives/cross-browser-ajax-updates-to-table-elements/9/comment-page-1#comment-29</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Tue, 02 Sep 2008 19:24:01 +0000</pubDate>
		<guid isPermaLink="false">http://ramblings.gibberishcode.net/?p=9#comment-29</guid>
		<description>When I&#039;m struggling with a question like yours myself, I usually have to recast the question in the context of what the Framework&#039;s purpose is.  In other words, ask yourself how your patches would significantly elevate/improve the framework itself?  In this particular case, the framework *does* provide you with ability to generate DOM objects out of HTML strings as I did above by wrapping my intent/purpose for the table elements in the htmlToElements() function call.

Sometimes you have to let the frameworks remain uncluttered and capture your specific use cases into a thin veneer (Adapter pattern) that your application invokes.  With this approach, what often happens is a library of useful functions and classes will grow organically and then become quite powerful and useful in of themselves.  http://clientside.cnet.com/ is a great example of such a set of libraries growing out from the Mootools framework.</description>
		<content:encoded><![CDATA[<p>When I&#8217;m struggling with a question like yours myself, I usually have to recast the question in the context of what the Framework&#8217;s purpose is.  In other words, ask yourself how your patches would significantly elevate/improve the framework itself?  In this particular case, the framework *does* provide you with ability to generate DOM objects out of HTML strings as I did above by wrapping my intent/purpose for the table elements in the htmlToElements() function call.</p>
<p>Sometimes you have to let the frameworks remain uncluttered and capture your specific use cases into a thin veneer (Adapter pattern) that your application invokes.  With this approach, what often happens is a library of useful functions and classes will grow organically and then become quite powerful and useful in of themselves.  <a href="http://clientside.cnet.com/" rel="nofollow">http://clientside.cnet.com/</a> is a great example of such a set of libraries growing out from the Mootools framework.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://ramblings.gibberishcode.net/archives/cross-browser-ajax-updates-to-table-elements/9/comment-page-1#comment-28</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Tue, 02 Sep 2008 16:44:06 +0000</pubDate>
		<guid isPermaLink="false">http://ramblings.gibberishcode.net/?p=9#comment-28</guid>
		<description>excellent post. helped a lot!

imo such a htmlToElement method is one of the most missing features of mootools. It&#039;s okay that they prefer working with DOM elements over using plain html for injection but there should at least be a simple bridge supported by the framework.

I&#039;m considering about to create a patch for the Elements constructor, which allows constructing DOM elements from plain HTML.

But i&#039;ts pretty hard to find a concise API for that purpose:

new Element(null,&#039;...&#039;);

is as ugly as..

Element.fromHTML(&#039;...&#039;);

also extending the String class is not the best option?

somewhat like:

&quot;...&quot;.toElement();

ideas? ;) welcome!

and again.. thanks for that article!</description>
		<content:encoded><![CDATA[<p>excellent post. helped a lot!</p>
<p>imo such a htmlToElement method is one of the most missing features of mootools. It&#8217;s okay that they prefer working with DOM elements over using plain html for injection but there should at least be a simple bridge supported by the framework.</p>
<p>I&#8217;m considering about to create a patch for the Elements constructor, which allows constructing DOM elements from plain HTML.</p>
<p>But i&#8217;ts pretty hard to find a concise API for that purpose:</p>
<p>new Element(null,&#8217;&#8230;&#8217;);</p>
<p>is as ugly as..</p>
<p>Element.fromHTML(&#8216;&#8230;&#8217;);</p>
<p>also extending the String class is not the best option?</p>
<p>somewhat like:</p>
<p>&#8220;&#8230;&#8221;.toElement();</p>
<p>ideas? <img src='http://ramblings.gibberishcode.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  welcome!</p>
<p>and again.. thanks for that article!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Max</title>
		<link>http://ramblings.gibberishcode.net/archives/cross-browser-ajax-updates-to-table-elements/9/comment-page-1#comment-14</link>
		<dc:creator>Max</dc:creator>
		<pubDate>Thu, 03 Jul 2008 13:41:53 +0000</pubDate>
		<guid isPermaLink="false">http://ramblings.gibberishcode.net/?p=9#comment-14</guid>
		<description>Working with .innerHTML and IE is lots of fun! (not)

You&#039;ve encountered a bug in IE that I track as bug 210.
http://webbugtrack.blogspot.com/2007/12/bug-210-no-innerhtml-support-on-tables.html

If you want to keep up to date with when IE fixes this issue (e.g. it isn&#039;t fixed in IE8 Betas yet), view other innerHTML bugs (http://webbugtrack.blogspot.com/search/label/innerHTML) or view other frustrating IE bugs feel free to peruse my bug blog.

Have a great day,
Max</description>
		<content:encoded><![CDATA[<p>Working with .innerHTML and IE is lots of fun! (not)</p>
<p>You&#8217;ve encountered a bug in IE that I track as bug 210.<br />
<a href="http://webbugtrack.blogspot.com/2007/12/bug-210-no-innerhtml-support-on-tables.html" rel="nofollow">http://webbugtrack.blogspot.com/2007/12/bug-210-no-innerhtml-support-on-tables.html</a></p>
<p>If you want to keep up to date with when IE fixes this issue (e.g. it isn&#8217;t fixed in IE8 Betas yet), view other innerHTML bugs (<a href="http://webbugtrack.blogspot.com/search/label/innerHTML" rel="nofollow">http://webbugtrack.blogspot.com/search/label/innerHTML</a>) or view other frustrating IE bugs feel free to peruse my bug blog.</p>
<p>Have a great day,<br />
Max</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2008-06-30 &#124; iKeif</title>
		<link>http://ramblings.gibberishcode.net/archives/cross-browser-ajax-updates-to-table-elements/9/comment-page-1#comment-11</link>
		<dc:creator>links for 2008-06-30 &#124; iKeif</dc:creator>
		<pubDate>Mon, 30 Jun 2008 17:31:48 +0000</pubDate>
		<guid isPermaLink="false">http://ramblings.gibberishcode.net/?p=9#comment-11</guid>
		<description>[...] Cross-browser AJAX updates to table elements - Ramblings 2 hours agoI&#039;m a firm believer that when problems arise, someone, somewhere will be working on your [...]</description>
		<content:encoded><![CDATA[<p>[...] Cross-browser AJAX updates to table elements &#8211; Ramblings 2 hours agoI&#8217;m a firm believer that when problems arise, someone, somewhere will be working on your [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
