<?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>Kerkness.ca &#187; mootools</title>
	<atom:link href="http://www.kerkness.ca/tagged/mootools/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kerkness.ca</link>
	<description>flexing my kerkness, among other things</description>
	<lastBuildDate>Wed, 14 Oct 2009 15:12:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Dynamically add row to a table using PHP and Mootools</title>
		<link>http://www.kerkness.ca/add-row-to-table/</link>
		<comments>http://www.kerkness.ca/add-row-to-table/#comments</comments>
		<pubDate>Mon, 25 May 2009 19:44:54 +0000</pubDate>
		<dc:creator>Kerk</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[injection]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://www.kerkness.ca/?p=529</guid>
		<description><![CDATA[This short cross browser example will show you how to dynamically add rows to a table using PHP and Mootools.
The Files

table_form.html  ::  This is our main HTML file.  It contains a HTML Table and a simple Form.
table_form.php :: This is the php file which will process the form and return results back to our HTML [...]]]></description>
			<content:encoded><![CDATA[<p>This short cross browser example will show you how to dynamically add rows to a table using PHP and Mootools.</p>
<h2>The Files</h2>
<ul>
<li>table_form.html  ::  This is our main HTML file.  It contains a HTML Table and a simple Form.</li>
<li>table_form.php :: This is the php file which will process the form and return results back to our HTML page</li>
<li><a href="http://kerkness.ca/moo/table_form/table_form.js">table_form.js</a> :: This is the Javascript file which will handle submitting data to php and handle the response</li>
<li>table_form.css :: basic css file to add styling</li>
</ul>
<p><a href="http://kerkness.ca/moo/table_form/table_form.html">View a Demo</a></p>
<p><a href="http://kerkness.ca/moo/table_form/table_form.zip">Download the full Source</a></p>
<p>I&#8217;ve tried to add detailed comments to the source code but if you have any questions just post them in the comments.</p>
<h2>The Bare Bones : Row Injection</h2>
<p>For those who are only interested in the table row injection here is a function which will get the job done and is crossbrowser. If you find otherwise let me know. The key here is instead of creating individual elements for tr and td and injecting them into the table, you create a full table element with a single row and inject that into your table.</p>
<pre name="code" class"js">
var inject_row = function( table, data )
{
    var str = '';
    data.each(function(item, index){
        str += '&lt;td&gt;'+item+'&lt;/td&gt;';
    });
    var tr = new Element('div', {
        html: '&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;' + str + '&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;'
    }).getElement('tr');
    tr.inject( table );
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.kerkness.ca/add-row-to-table/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hot Flash Alert :: An Alert Box using Mootools</title>
		<link>http://www.kerkness.ca/mootools-alert-box/</link>
		<comments>http://www.kerkness.ca/mootools-alert-box/#comments</comments>
		<pubDate>Sat, 23 May 2009 17:29:16 +0000</pubDate>
		<dc:creator>Kerk</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Components]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[alert]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>

		<guid isPermaLink="false">http://www.kerkness.ca/?p=507</guid>
		<description><![CDATA[I&#8217;ve been playing around with mootools and have created a little alert box called &#8220;Hot Flash Alert&#8221; which can be handy for flashing confirmation messages to a user or informing them of input errors.
Example
Show Alert then Fade
Show Alert
To use Hot Flash Alert in your web site you&#8217;ll need to complete a few simple steps.
Step 1 [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing around with mootools and have created a little alert box called &#8220;Hot Flash Alert&#8221; which can be handy for flashing confirmation messages to a user or informing them of input errors.</p>
<h2>Example</h2>
<p><a id="hot_flash_fade_out_button" href="#">Show Alert then Fade</a></p>
<p><a id="hot_flash_button" href="#">Show Alert</a></p>
<p>To use Hot Flash Alert in your web site you&#8217;ll need to complete a few simple steps.</p>
<h2>Step 1 : Include the required Javascript and CSS files in your web site header.</h2>
<p>The Hot Flash Alert requires <a href="http://ajax.googleapis.com/ajax/libs/mootools/1.2.1/mootools-yui-compressed.js">Mootools.js</a>, <a href="http://kerkness.ca/hot_flash/hot_flash.js">hot_flash.js</a>, and <a href="http://kerkness.ca/hot_flash/hot_flash.css">hot_flash.css</a> .</p>
<h2>Step 2 : Add the Alert Box DIV to your theme</h2>
<p>The Hot Flash Alert is actually a div which sits in your web page until it is called.  It&#8217;s probably best to stick the div at the bottom of your web page so that it displays on top of any other absolutely positioned elements.</p>
<pre>
&lt;div id="alert_box"&gt;
   &lt;div id="alert_head"&gt;
      &lt;a id="alert_box_x" href="#"&gt;close&lt;/a&gt;
   &lt;/div&gt;
   &lt;div id="alert_box_message"&gt;&lt;/div&gt;
&lt;/div&gt;</pre>
<p>You can customize the DIV anyway you want but it will require all four elements &#8216;alert_box&#8217;, &#8216;alert_head&#8217;, &#8216;alert_box_x&#8217; and &#8216;alert_box_message&#8217;.  The styling of these elements is handled by the <a href="http://kerkness.ca/hot_flash/hot_flash.css">hot_flash.css</a> file.</p>
<h2>Step 3 :  Call the hot_flash() javascript method</h2>
<p>Once all the pieces are in place you can pop open the Hot Flash Alert by calling the hot_flash() javacript method. </p>
<pre>
 // text = the message that will be displayed
 // duration (optional) milliseconds to fade out the alert
 hot_flash( text, duration );
</pre>
<p>Here are some examples.</p>
<pre>
  // simple alert that fades out on it's own
  // over 2000 milliseconds ( or 2 seconds )
  hot_flash('hello world', 2000 );

  // simple alert with close button
  hot_flash('goodbye world');</pre>
<p>It&#8217;s as simple as that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerkness.ca/mootools-alert-box/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
