<?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>Ajax Bestiary &#187; YUI</title>
	<atom:link href="http://www.ajaxbestiary.com/tag/yui/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ajaxbestiary.com</link>
	<description>AJAX Development, News, Techniques &#38; More</description>
	<lastBuildDate>Sat, 19 Jun 2010 13:43:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>YUI Calendar Popup from Text Input</title>
		<link>http://www.ajaxbestiary.com/2008/10/19/yui-calendar-popup-from-text-input/</link>
		<comments>http://www.ajaxbestiary.com/2008/10/19/yui-calendar-popup-from-text-input/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 01:05:20 +0000</pubDate>
		<dc:creator>Don Albrecht</dc:creator>
				<category><![CDATA[Widget]]></category>
		<category><![CDATA[YUI]]></category>
		<category><![CDATA[calendar]]></category>

		<guid isPermaLink="false">http://www.ajaxbestiary.com/?p=327</guid>
		<description><![CDATA[

I needed a way to provide my users with a date picker that was automatically provided when a text area received focus.  I was eager to use the excellent YUI calendar as a starting point, but the provided documentation didn&#8217;t provide a solid example for this type of implementation.
Dav Glass has provided a solid example [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>I needed a way to provide my users with a date picker that was automatically provided when a text area received focus.  I was eager to use the excellent <a title="Yui Calendar Documentation" href="http://developer.yahoo.com/yui/calendar/">YUI calendar</a> as a starting point, but the provided documentation didn&#8217;t provide a solid example for this type of implementation.</p>
<p>Dav Glass has provided a solid example of the<a href="http://blog.davglass.com/files/yui/cal2/"> Calendar tied to a text input</a>. But, his example is highly dependent on the text input having specific ids.  This doesn&#8217;t take advantage of YUI&#8217;s excellent Selector library really didn&#8217;t meet my need for a simple universal solution.</p>
<h2><span style="font-weight: normal;">K</span>ey Requirements:</h2>
<ol>
<li>Progressive Enhancement (No inline javascript)</li>
<li>Yui based</li>
<li>Universal implementation across all pages in a site.</li>
<li>Support for multiple date inputs on a page.</li>
</ol>
<h2>Getting Started:</h2>
<div>The bulk of the code used is pretty solidly Dav&#8217;s I&#8217;ve simply replaced all of the hard coded references to dynamically generated targets and moved from hard coded ID&#8217;s for the target fields to a css class.  Lastly, I&#8217;ve added a &#8220;activeCal&#8221; class to the currently active target input so that one calendar can be recycled across multiple text areas on the page.</div>
<h2>Source:</h2>
<p><code></p>
<div>var cal1;</div>
<div>var over_cal = false;</div>
<div>function transmogCals() {</div>
<div>    cal1 = new YAHOO.widget.Calendar("cal1","cal1Container");</div>
<div>    cal1.selectEvent.subscribe(getDate, cal1, true);</div>
<div>    cal1.renderEvent.subscribe(setupListeners, cal1, true);</div>
<div>    var pickers =  YAHOO.util.Selector.query('.date-picker'); </div>
<div>for( i in pickers){</div>
<div>    YAHOO.util.Event.addListener(pickers[i], 'focus', showCal);</div>
<div>    YAHOO.util.Event.addListener(pickers[i], 'blur', hideCal);</div>
<div>    }</div>
<div>cal1.render();</div>
<div>}</div>
<div>function setupListeners() {</div>
<div>    YAHOO.util.Event.addListener('cal1Container', 'mouseover', overCal);</div>
<div>    YAHOO.util.Event.addListener('cal1Container', 'mouseout', outCal);</div>
<div>}</div>
<div>function getDate() {</div>
<div>        var calDate = this.getSelectedDates()[0];</div>
<div>        calDate = (calDate.getMonth() + 1) + '/' + calDate.getDate() + '/' + calDate.getFullYear();</div>
<div>        YAHOO.util.Selector.query('.activeCal')[0].value = calDate;</div>
<div>        over_cal = false;</div>
<div>        hideCal();</div>
<div>}</div>
<div>function showCal(e, targ) {</div>
<div>    var xy = YAHOO.util.Dom.getXY(this);</div>
<div>    var el = new YAHOO.util.Element(this); </div>
<div>    el.addClass('activeCal');</div>
<div>    var date = this.value;</div>
<div>    if (date) {</div>
<div>        cal1.cfg.setProperty('selected', date);</div>
<div>        cal1.cfg.setProperty('pagedate', new Date(date), true);</div>
<div>        cal1.render();</div>
<div>    }</div>
<div>    YAHOO.util.Dom.setStyle('cal1Container', 'display', 'block');</div>
<div>    xy[1] = xy[1] + 20;</div>
<div>    YAHOO.util.Dom.setXY('cal1Container', xy);</div>
<div>}</div>
<div>function hideCal() {</div>
<div>    if (!over_cal) {</div>
<div>         var el = new YAHOO.util.Element(this); </div>
<div>        el.removeClass('activeCal');</div>
<div>        YAHOO.util.Dom.setStyle('cal1Container', 'display', 'none');</div>
<div>    }</div>
<div>}</div>
<div>function overCal() {</div>
<div>    over_cal = true;</div>
<div>}</div>
<div>function outCal() {</div>
<div>    over_cal = false;</div>
<div>}</div>
<div>YAHOO.util.Event.addListener(window, 'load', transmogCals);</div>
<p></code></p>
<p> </p>
<h2>Adding it to your page</h2>
<p>Integrating the code into the page is VERY easy.</p>
<p>In the header of the page add the following css includes.</p>
<pre>&lt;link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?2.6.0/build/calendar/assets/skins/sam/calendar.css"&gt;</pre>
<div><span>In the footer add the following script include and include the date-picker.js file</span></div>
<div>
<table class="dp-xml" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="line2"><span class="tag">&lt;</span><span>script </span><span class="attribute">type</span><span>=</span><span class="attribute-value">&#8220;text/javascript&#8221;</span><span> </span><span class="attribute">src</span><span>=</span><span class="attribute-value">&#8220;http://yui.yahooapis.com/combo?2.6.0/build/yahoo-dom-event/yahoo-dom-event.js&amp;2.6.0/build/calendar/calendar-min.js&amp;2.6.0/build/selector/selector-beta-min.js&#8221;</span><span>&gt;</span><span class="tag">&lt;/</span><span>script</span><span class="tag">&gt;</span><span> </span></td>
</tr>
</tbody>
<thead></thead>
</table>
</div>
<div>Lastly, place a class of date-picker to any text fields you want to tie to the input and add the following to your pages markup:</div>
<p> </p>
<p><code></p>
<div>&lt;div class='yui-skin-sam' style="position:absolute; left:-1000px;"&gt;</div>
<div>     &lt;div id="cal1Container"&gt;&lt;/div&gt;</div>
<div>   &lt;/div&gt;</div>
<p></code></p>
<p><img src="http://www.ajaxbestiary.com/?voyeur=1"></p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.ajaxbestiary.com/2008/10/19/yui-calendar-popup-from-text-input/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>YUI 2.4 has landed</title>
		<link>http://www.ajaxbestiary.com/2007/12/05/yui-24-has-landed/</link>
		<comments>http://www.ajaxbestiary.com/2007/12/05/yui-24-has-landed/#comments</comments>
		<pubDate>Wed, 05 Dec 2007 15:59:44 +0000</pubDate>
		<dc:creator>Don Albrecht</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[YUI]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[Release]]></category>

		<guid isPermaLink="false">http://www.ajaxbestiary.com/2007/12/05/yui-24-has-landed/</guid>
		<description><![CDATA[

YUI has announced a major new release with the  immediate availability of YUI 2.4.
Key Features:

Selector Utility: Following in the footsteps of most other toolkits, YUI now includes a CSS Selector.  This beta component includes much of the standard CSS3 selector syntax including the proposed Selector extensions.
Charting: Using a hybrid Flash / Javascript model, a new [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>YUI has announced a major new release with the  immediate availability of YUI 2.4.</p>
<p><strong>Key Features:</strong></p>
<ul>
<li><strong>Selector Utility:</strong> Following in the footsteps of most other toolkits, YUI now includes a CSS Selector.  This beta component includes much of the standard CSS3 selector syntax including the proposed Selector extensions.</li>
<li><strong>Charting: </strong>Using a hybrid Flash / Javascript model, a new charting component has been released with support for bar, line and pie charts.  Of special note is the fact that the charting utility utilizes the same data model as the data table implementation allowing hybrid chart / table interfaces.</li>
<li><strong>Get:</strong> dynamically load scripts and nodes via the new Get tools.</li>
<li><strong>Profiler:</strong> This combined with YUI Test will allow you to quickly and efficiently determine profiles and unit tests.  Most notably, profiler allows unit tests based on performance to be performed.</li>
<li><strong>JSON Utility:</strong> dramatically improved JSON support.</li>
</ul>
<p>Behind the scenes:</p>
<p>Incremental improvments to: Calendar, Drag &amp; Drop &amp; Button controls.</p>
<p>Dramatic enhancements &amp; customization support added to the Rich Text Editor:</p>
<p>Read about the release here:</p>
<p><a href="http://yuiblog.com/blog/2007/12/04/yuii-240/">http://yuiblog.com/blog/2007/12/04/yuii-240/</a></p>
<p><img src="http://www.ajaxbestiary.com/?voyeur=1"></p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.ajaxbestiary.com/2007/12/05/yui-24-has-landed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Determining Position with YUI</title>
		<link>http://www.ajaxbestiary.com/2007/11/05/determining-position-with-yui/</link>
		<comments>http://www.ajaxbestiary.com/2007/11/05/determining-position-with-yui/#comments</comments>
		<pubDate>Mon, 05 Nov 2007 13:57:23 +0000</pubDate>
		<dc:creator>Don Albrecht</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[YUI]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[dimensions]]></category>
		<category><![CDATA[Space]]></category>

		<guid isPermaLink="false">http://www.ajaxbestiary.com/2007/11/05/determining-position-with-yui/</guid>
		<description><![CDATA[

Today we conclude our series of posts on space &#38; dimension with an exploration of YUI&#8217;s Spacial capabilities.  Many of YUI&#8217;s capabilities aren&#8217;t readily apparent from the component level documentation.  One exception are the setXY &#38; getXY functions.

setXY &#38; getXY operate on the top left corner of an Element relative to the top [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Today we conclude our series of posts on space &amp; dimension with an exploration of YUI&#8217;s Spacial capabilities.  Many of YUI&#8217;s capabilities aren&#8217;t readily apparent from the component level documentation.  One exception are the setXY &amp; getXY functions.</p>
<ul>
<li>setXY &amp; getXY operate on the top left corner of an Element relative to the top left corner of the document.</li>
<li>A companion getXY is provided with the YUI event object to determine the location of clicks.</li>
</ul>
<p>A look at YUI&#8217;s API&#8217;s reveals a second, powerful class for dealing with 2d space.  The YUI region class is a representation of an object on a grid.  Region provides the top, left, right &amp; bottom locations in a rectangular shape.  Region is not a tool for manipulating the dom, rather it is a utility class for determining the union, intersection, area and other properties of a defined rectangular area.</p>
<p>YUI lacks many of the capabilities for handling scrolls, widths  &amp; heights we&#8217;ve encountered in other toolkits but still provides a reasonably capable set of tools with which to handle locations within a document.</p>
<p><img src="http://www.ajaxbestiary.com/?voyeur=1"></p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.ajaxbestiary.com/2007/11/05/determining-position-with-yui/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nagging Thoughts About CSS Frameworks</title>
		<link>http://www.ajaxbestiary.com/2007/10/24/nagging-thoughts-about-css-frameworks/</link>
		<comments>http://www.ajaxbestiary.com/2007/10/24/nagging-thoughts-about-css-frameworks/#comments</comments>
		<pubDate>Wed, 24 Oct 2007 14:40:59 +0000</pubDate>
		<dc:creator>Don Albrecht</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[Blueprint]]></category>
		<category><![CDATA[css frameworks]]></category>
		<category><![CDATA[semantic web]]></category>
		<category><![CDATA[tripoli]]></category>
		<category><![CDATA[YAML]]></category>
		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://www.ajaxbestiary.com/2007/10/24/nagging-thoughts-about-css-frameworks/</guid>
		<description><![CDATA[

Let me start by saying that I love CSS frameworks.  From Tripoli to Blueprint, YUI to YAML, I&#8217;ve embraced them fully into my design and development process over the past 9 months.  Unfortunately, throughout that time I&#8217;ve had to deal with a nagging issue: The Semantic Web.
CSS exists to shed the shackles of inline formatting [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Let me start by saying that I love CSS frameworks.  From Tripoli to Blueprint, YUI to YAML, I&#8217;ve embraced them fully into my design and development process over the past 9 months.  Unfortunately, throughout that time I&#8217;ve had to deal with a nagging issue: The Semantic Web.</p>
<p>CSS exists to shed the shackles of inline formatting and truly separate content from display.  While It&#8217;s rarely possible to achieve all of a project goals in a semantic way, CSS frameworks really fly in the face of a semantic approach. Don&#8217;t get me wrong, I still think CSS is the way to go and that frameworks provide powerful scaffolding, but I think we all need to be aware that using CSS grid &amp; layout frameworks isn&#8217;t exactly a true separation of content &amp; styling.</p>
<p>Take for example, blueprint.  Blueprint contains a powerful set of tools for building a layout.  Unfortunately, these tools require that columns be explicitly defined in the page source &lt;div class=&#8221;column span-2&#8243;&gt;.  This makes it impossible for a change in stylesheet to completely alter a page layout for mobile devices without discarding the column &amp; span classes and relying on an independent set of markup e.g. &lt;div class=&#8221;column span-2 mobile-column mobile-span-5&#8243;&gt;.  This is a rather cumbersome noose to have to carry for some projects.  Especially when the infrastructure isn&#8217;t in place to deliver two distinct versions of the site from the server.</p>
<p>I&#8217;m wondering how you have addressed these problems in past projects?</p>
<p><img src="http://www.ajaxbestiary.com/?voyeur=1"></p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.ajaxbestiary.com/2007/10/24/nagging-thoughts-about-css-frameworks/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>YUI Menu: A widget for the masses.</title>
		<link>http://www.ajaxbestiary.com/2007/10/10/yui-menu-a-widget-for-the-masses/</link>
		<comments>http://www.ajaxbestiary.com/2007/10/10/yui-menu-a-widget-for-the-masses/#comments</comments>
		<pubDate>Wed, 10 Oct 2007 16:28:33 +0000</pubDate>
		<dc:creator>Don Albrecht</dc:creator>
				<category><![CDATA[Widget]]></category>
		<category><![CDATA[Widgets]]></category>
		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://www.ajaxbestiary.com/2007/10/10/yui-menu-a-widget-for-the-masses/</guid>
		<description><![CDATA[

The YUI toolkit includes an entire family of Menu widgets with support for:

Screen Reader Accessibility
Keyboard and Mouse Navigation
A Rich Event Model that Provides Access to all features
Support for Progressive Enhancement; Menus can be created from simple html  structures or 100% in javascript.


More Information:
http://developer.yahoo.com/yui/menu/ 


]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>The YUI toolkit includes an entire family of Menu widgets with support for:</p>
<ul>
<li>Screen Reader Accessibility</li>
<li>Keyboard and Mouse Navigation</li>
<li>A Rich Event Model that Provides Access to all features</li>
<li>Support for Progressive Enhancement; Menus can be created from simple html  structures or 100% in javascript.</li>
</ul>
<p><img src="http://www.ajaxbestiary.com/wp-content/uploads/2007/09/yuimenudemo.png" alt="Yui Menu Demo" /></p>
<p>More Information:</p>
<p><a href="http://developer.yahoo.com/yui/menu/">http://developer.yahoo.com/yui/menu/ </a></p>
<p><img src="http://www.ajaxbestiary.com/?voyeur=1"></p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.ajaxbestiary.com/2007/10/10/yui-menu-a-widget-for-the-masses/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YUI Color Picker</title>
		<link>http://www.ajaxbestiary.com/2007/10/09/yui-color-picker/</link>
		<comments>http://www.ajaxbestiary.com/2007/10/09/yui-color-picker/#comments</comments>
		<pubDate>Tue, 09 Oct 2007 11:16:12 +0000</pubDate>
		<dc:creator>Don Albrecht</dc:creator>
				<category><![CDATA[Widgets]]></category>
		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://www.ajaxbestiary.com/2007/10/09/yui-color-picker/</guid>
		<description><![CDATA[

Give Choice to your users with a truly flexible Color Picker Widget:
 
The YUI Color picker has been around since 2.3 and I&#8217;m trying to find an excuse to use it in a project.&#xA0; It&#8217;s easy to implement &#38; play with and quite powerful.&#xA0; Unfortunately, I keep finding it a bit too powerful to give [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Give Choice to your users with a truly flexible Color Picker Widget:</p>
<p><a href="http://www.ajaxbestiary.com/wp-content/uploads/2007/09/colorpicker.jpg"><img style="border-right: 0px; border-top: 0px; margin: 18px 40px 18px 30px; border-left: 0px; border-bottom: 0px" height="212" alt="colorpicker" src="http://www.ajaxbestiary.com/wp-content/uploads/2007/09/colorpicker-thumb.jpg" width="410" border="0" /></a> </p>
<p>The YUI Color picker has been around since 2.3 and I&#8217;m trying to find an excuse to use it in a project.&#xA0; It&#8217;s easy to implement &amp; play with and quite powerful.&#xA0; Unfortunately, I keep finding it a bit too powerful to give to my users.&#xA0; The one time I tried using it in a light weight CMS the site turned into a Lime Green monstrosity.</p>
<p>Does anyone have any experience implementing color pickers?&#xA0; What do you do to enforce visual styling?&#xA0; </p>
<p>I encourage you to take the widget for a spin at:</p>
<p><a title="http://developer.yahoo.com/yui/colorpicker/#start" href="http://developer.yahoo.com/yui/colorpicker/#start">http://developer.yahoo.com/yui/colorpicker/#start</a></p>
<p>Then come back and brainstorm ideas with me in the comments.</p>
<p><img src="http://www.ajaxbestiary.com/?voyeur=1"></p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.ajaxbestiary.com/2007/10/09/yui-color-picker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a Dynamic Form with YUI</title>
		<link>http://www.ajaxbestiary.com/2007/09/28/building-a-dynamic-form-with-yui/</link>
		<comments>http://www.ajaxbestiary.com/2007/09/28/building-a-dynamic-form-with-yui/#comments</comments>
		<pubDate>Fri, 28 Sep 2007 11:49:23 +0000</pubDate>
		<dc:creator>Don Albrecht</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Form Elements]]></category>
		<category><![CDATA[Widgets]]></category>
		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://www.ajaxbestiary.com/2007/09/28/building-a-dynamic-form-with-yui/</guid>
		<description><![CDATA[

YUI provides for the creation of forms dynamically without the need for pre-existing markup through the Button object. 
Despite its name, the button is a rich widget that supports the creation of:

Push Buttons
Link Buttons
Submit Buttons
Reset Button
Checkboxes
Radios
Menus
Split button (hybrid button menus)

Today we are exploring the creation of buttons dynamically from javascript.&#xA0;&#xA0; Creation itself is simple.&#xA0; 


The [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>YUI provides for the creation of forms dynamically without the need for pre-existing markup through the Button object. </p>
<p>Despite its name, the button is a rich widget that supports the creation of:</p>
<ul>
<li>Push Buttons</li>
<li>Link Buttons</li>
<li>Submit Buttons</li>
<li>Reset Button</li>
<li>Checkboxes</li>
<li>Radios</li>
<li>Menus</li>
<li>Split button (hybrid button menus)</li>
</ul>
<p><font color="#000000">Today we are exploring the creation of buttons dynamically from javascript.&#xA0;&#xA0; Creation itself is simple.&#xA0; </font></p>
<p><span id="more-85"></span></p>
<p><font color="#000000"></font></p>
<p><font color="#000000">The syntax is:</font></p>
<pre> var oButton = new YAHOO.widget.Button({ id: &quot;mybuttonid&quot;, type: &quot;button&quot;, label: &quot;My Button&quot;, container: &quot;someelement&quot; });</pre>
<p>&#xA0;</p>
<p>Where:</p>
<ul>
<li><font color="#333333">id = the id of the element to be created</font></li>
<li><font color="#333333">type = the type of button (push, link, submit, reset, checkbox, radio, menu or split)</font></li>
<li><font color="#333333">label = the visual label to display</font></li>
<li><font color="#333333">container = the element in which to append the button.</font></li>
</ul>
<p>Id and type are optional, Defaulting to a randomly created ID &amp; &quot;button&quot; respectively.</p>
<p><img src="http://www.ajaxbestiary.com/?voyeur=1"></p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.ajaxbestiary.com/2007/09/28/building-a-dynamic-form-with-yui/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Build a YUI Panel from Content</title>
		<link>http://www.ajaxbestiary.com/2007/09/21/build-a-yui-panel-from-content/</link>
		<comments>http://www.ajaxbestiary.com/2007/09/21/build-a-yui-panel-from-content/#comments</comments>
		<pubDate>Fri, 21 Sep 2007 15:53:59 +0000</pubDate>
		<dc:creator>Don Albrecht</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Widgets]]></category>
		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://www.ajaxbestiary.com/2007/09/21/build-a-yui-panel-from-content/</guid>
		<description><![CDATA[

After yesterday&#8217;s comment regarding my display:none / innerHTML hack on building a YUI panel.&#xA0; I thought I&#8217;d quickly show you how to build a panel from markup without the display:none;
For a quick refresher, I recommend you read: http://www.ajaxbestiary.com/2007/09/19/building-a-form-in-a-modal-panel-with-yui/
Now, to achieve the same results we can do the following.

Remove the display:none from the panel div
Place the [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>After yesterday&#8217;s comment regarding my display:none / innerHTML hack on building a YUI panel.&#xA0; I thought I&#8217;d quickly show you how to build a panel from markup without the display:none;</p>
<p>For a quick refresher, I recommend you read: <a title="http://www.ajaxbestiary.com/2007/09/19/building-a-form-in-a-modal-panel-with-yui/" href="http://www.ajaxbestiary.com/2007/09/19/building-a-form-in-a-modal-panel-with-yui/">http://www.ajaxbestiary.com/2007/09/19/building-a-form-in-a-modal-panel-with-yui/</a></p>
<p>Now, to achieve the same results we can do the following.</p>
<ol>
<li><font color="#333333">Remove the display:none from the panel div</font></li>
<li><font color="#333333">Place the form into a &lt;div class=&quot;bd&quot;&gt; tag</font></li>
<li><font color="#333333">Place the form header in a &lt;div class=&quot;hd&quot;&gt; tag before the bd tag but inside of the panel div.</font></li>
<li><font color="#333333">If you&#8217;re going to add a footer, place it after the &lt;div class=&quot;bd&quot;&gt; tag inside of a &lt;div class=&quot;ft&quot;&gt; tag</font></li>
<li><font color="#333333">Replace the instantiation command with myPanel = new YAHOO.widget.Panel( &quot;panelid&quot;); where &quot;panelid&quot; is the id of the div wrapping the various panel containers.&#xA0; </font></li>
<li><font color="#333333">You now have a panel to render, show, hide &amp; modify based on your page content.</font></li>
</ol>
<p>I apologize for the shotgun approach to this post, but I thought it was a handy correction to get out there.</p>
<p><img src="http://www.ajaxbestiary.com/?voyeur=1"></p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.ajaxbestiary.com/2007/09/21/build-a-yui-panel-from-content/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a Form in a Modal Panel with YUI</title>
		<link>http://www.ajaxbestiary.com/2007/09/19/building-a-form-in-a-modal-panel-with-yui/</link>
		<comments>http://www.ajaxbestiary.com/2007/09/19/building-a-form-in-a-modal-panel-with-yui/#comments</comments>
		<pubDate>Wed, 19 Sep 2007 23:20:49 +0000</pubDate>
		<dc:creator>Don Albrecht</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Widgets]]></category>
		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://www.ajaxbestiary.com/2007/09/19/building-a-form-in-a-modal-panel-with-yui/</guid>
		<description><![CDATA[

Building a Modal Filtering List with YUI
In this tutorial we will build a simple form and embed it in a modal panel.
Building the form
There are two approaches we could take towards building the form : dynamic or static.  A dynamically loaded interface is built by the javascript executed on page load, a static interface [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Building a Modal Filtering List with YUI</p>
<p>In this tutorial we will build a simple form and embed it in a modal panel.</p>
<p><strong>Building the form<br />
</strong>There are two approaches we could take towards building the form : dynamic or static.  A dynamically loaded interface is built by the javascript executed on page load, a static interface lurks hidden inside the html source and is displayed when needed.  For the sake of simplicity, we will be using a static interface in this tutorial.</p>
<p>Our form is quite simple.  It consists of 3 tiers of options and a submit button:</p>
<pre>
&lt;div id="filterpanelform" style="display:none"&gt;
&lt;fieldset&gt;&lt;legend&gt;Type&lt;/legend&gt;
&lt;input name="type" value="berry" type="checkbox"&gt;Berry
&lt;input name="type" value="citrus" type="checkbox"&gt;Citrus
&lt;input name="type"value="drupe" type="checkbox"&gt;Drupe
&lt;input name="type" value="Melon" type="checkbox"&gt;Melon
&lt;/fieldset&gt;

&lt;fieldset&gt;&lt;legend&gt; Size &lt;/legend&gt;
&lt;input name="size" value="small" type="checkbox"&gt;Small
&lt;input name="size" value="medium" type="checkbox"&gt;Medium
&lt;input name="size" value="large" type="checkbox"&gt;Large
&lt;/fieldset&gt;

&lt;fieldset&gt;&lt;legend&gt; Color &lt;/legend&gt;
&lt;input name="color" value="red" type="checkbox"&gt;Red
&lt;input name="color" value="orange" type="checkbox"&gt;Orange
&lt;input name="color" value="yellow" type="checkbox"&gt;Yellow
&lt;input name="color" value="green" type="checkbox"&gt;Green
&lt;input name="color" value="purple" type="checkbox"&gt;Purple
&lt;input name="color" value="pink" type="checkbox"&gt;Pink
&lt;/fieldset&gt;

&lt;button value="Filter" name="doFilter" type="button"id="doFilter"&gt;Filter&lt;/button&gt;
&lt;/div&gt;</pre>
<p>Notice the style=&#8221;display:none;&#8221; on the containing div?  This is to hide the contents from view until our user calls the modal dialog.</p>
<p><strong>Building the Modal Interface</strong></p>
<p>Now we need to build a YUI panel to contain the filtering interface. Unlike the form elements, the panel we will build dynamically. The panel will be created on page load, but will remain hidden until called for.</p>
<pre>// Instantiate a Panel from script
YAHOO.example.container.FormPanel = new YAHOO.widget.Panel("formPanel", { width:"320px", visible:false, draggable:true, close:true} );
YAHOO.example.container.FormPanel.setHeader("Form Panel");

//populate the panel with the form we've hidden in the HTML
YAHOO.example.container.FormPanel.setBody( document.getElementById("filterpanelform").innerHTML );

YAHOO.example.container.FormPanel.render("container");</pre>
<p><img src="http://www.ajaxbestiary.com/?voyeur=1"></p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.ajaxbestiary.com/2007/09/19/building-a-form-in-a-modal-panel-with-yui/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Why Are CSS Frameworks Important to AJAX Development</title>
		<link>http://www.ajaxbestiary.com/2007/09/06/why-are-css-frameworks-important-to-ajax-development/</link>
		<comments>http://www.ajaxbestiary.com/2007/09/06/why-are-css-frameworks-important-to-ajax-development/#comments</comments>
		<pubDate>Thu, 06 Sep 2007 16:53:26 +0000</pubDate>
		<dc:creator>Don Albrecht</dc:creator>
				<category><![CDATA[Blueprint]]></category>
		<category><![CDATA[css frameworks]]></category>
		<category><![CDATA[YAML]]></category>
		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://www.ajaxbestiary.com/2007/09/06/why-are-css-frameworks-important-to-ajax-development/</guid>
		<description><![CDATA[

Think of it as Visual Risk Management.&#160; As AJAX developers, we regularly place control over swaths of the DOM in the hands of our users and outside of our web designers control.&#160; Sure, we can restrict the users capabilities, clean up word html, run things through validators, &#38; provide all the styles needed, but these [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Think of it as Visual Risk Management.&nbsp; <br />As AJAX developers, we regularly place control over swaths of the DOM in the hands of our users and outside of our web designers control.&nbsp; Sure, we can restrict the users capabilities, clean up word html, run things through validators, &amp; provide all the styles needed, but these fixes require us to anticipate problems before they happen.</p>
<p>Using CSS frameworks, takes a lot of the risk out of the situation.&nbsp; A CSS framework removes the risk of a user accidentally calling on a structure that hasn&#8217;t been anticipated or that isn&#8217;t properly styled by our existing stylesheets.&nbsp;&nbsp; CSS frameworks take the guessing work out of the situation.&nbsp; By reseting and frequently standardizing all possible html elements.&nbsp; A CSS framework ensures that your markup behaves appropriately across browsers and user inputs.&nbsp; It doesn&#8217;t matter what framework you use either.&nbsp; In fact, a corporation&#8217;s professionally built CSS templates likely include all of the resets &amp; standardizations needed.</p>
<p>If you don&#8217;t trust your stylesheets or are building one from scratch. I recommend you investigate the following frameworks.
<ul>
<li><a href="http://www.ajaxbestiary.com/category/yaml/">YAML</a></li>
<li><a href="http://www.ajaxbestiary.com/category/blueprint/">Blueprint</a></li>
<li><a href="http://www.ajaxbestiary.com/category/yui/">YUI CSS</a></li>
<li><a href="http://www.ajaxbestiary.com/2007/09/06/tripoli-css-reset-style-standard/">Tripoli</a></li>
<li><a href="http://meyerweb.com/eric/css/">Eric Meyer&#8217;s Reset CSS<br /></a></li>
</ul>
<p><img src="http://www.ajaxbestiary.com/?voyeur=1"></p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.ajaxbestiary.com/2007/09/06/why-are-css-frameworks-important-to-ajax-development/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
