<?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; Tips</title>
	<atom:link href="http://www.ajaxbestiary.com/tag/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ajaxbestiary.com</link>
	<description>AJAX Development, News, Techniques &#38; More</description>
	<lastBuildDate>Wed, 01 Feb 2012 12:46:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Getting Started With Chrome Frame</title>
		<link>http://www.ajaxbestiary.com/2011/06/06/getting-started-with-chrome-frame/</link>
		<comments>http://www.ajaxbestiary.com/2011/06/06/getting-started-with-chrome-frame/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 02:47:24 +0000</pubDate>
		<dc:creator>Don Albrecht</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Chrome frame]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Trident]]></category>

		<guid isPermaLink="false">http://www.ajaxbestiary.com/?p=416</guid>
		<description><![CDATA[As a follow up to my last post, I thought I&#8217;d put out an instruction on actually creating a Google Chrome retreat. Step 1: Add a Chrome Frame header to your site. Add this to the head of the Chrome Frame dependent pages: &#60;meta http-equiv="X-UA-Compatible" content="chrome=1"&#62;. If this isn&#8217;t practical, You can also configure your [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>As a follow up to my last post, I thought I&#8217;d put out an instruction on actually creating a Google Chrome retreat.</p>
<h3>Step 1: Add a Chrome Frame header to your site.</h3>
<p>Add this to the head of the Chrome Frame dependent pages:</p>
<p><code>&lt;meta</code> <code>http-equiv</code><code>=</code><code>"X-UA-Compatible"</code> <code>content</code><code>=</code><code>"chrome=1"</code><code>&gt;. </code></p>
<p>If this isn&#8217;t practical, You can also configure your server to send an HTTP header of</p>
<p><code>X-UA-Compatible: </code><code>chrome=1</code></p>
<p>I advise against this approach, however because server configs won&#8217;t be immediately available to other users on a site.  By its nature, a Chrome Frame retreat should be considered a reasonably unique event.  It&#8217;s good to clearly document this dependency for anyone else who may need to debug things later.  Once you&#8217;ve started to retreat, make sure you&#8217;re applying the header to every page of the site.  The two engines render things differently and you may create an inconsistent experience for your users if they are transitioning between Chrome Frame and Trident environments frequently.  In my experience, border-radius and drop shadow toggling on and off is a pretty strong &#8220;It&#8217;s Broken&#8221; signal for end users.</p>
<p>Step 2: Identify your Dependency Wall.</p>
<ol>
<li>Identify the range of pages / screens in your web app that you can&#8217;t support in IE.</li>
<li>Identify the navigation routes to those pages.</li>
<li>Leverage the routes to find natural locations for gatekeepers.
<ol>
<li>
<ol>
<li>Login Screens (the perfect location)</li>
<li>Tutorial Screens (A natural context fit for users)</li>
<li>An Advanced Mode (Similar to the &#8220;enriched mode&#8221; Microsoft uses for ActiveX requiring cloud apps).</li>
</ol>
</li>
</ol>
<ul>
<li>If you&#8217;re lucky, this will be a screen somewhere beyond your conversion pipeline.</li>
</ul>
</li>
<li>Create an interception event for IE users.  You can bake this into your app, but the easy way is with conditional comments.
<ol>
<li>Identify the Dom Nodes in your layout that must be presented to the user for them to progress.</li>
<li>&lt;div id=&#8217;loginbox&#8217;&gt;&#8230;&lt;/div&gt;</li>
<li>Create a conditional comment to hide the nodes and prompt the user to install Chrome Frame.</li>
</ol>
<ol>
<li>Be careful of z-index.  The chrome install iframe doesn&#8217;t work well if IE is floating some other content node on top of the install button.</li>
<li>UN-INSTALL chrome frame once you&#8217;ve tested your retreat perimeter.  This is a big deal for ongoing development as you won&#8217;t be testing in IE otherwise.</li>
<li>Becareful about your conversion pipeline.  Your key selling points may be behind the perimeter, but the act of demanding Chrome Frame is a pretty severe barrier to forward movement.</li>
</ol>
</li>
<p><code>&lt;html&gt;<br />
&lt;body&gt; &lt;div id='prompt'&gt;&lt;/div&gt;</code><code> &lt;!--[if IE]&gt;</code><br />
<code> &lt;script</code> <code>type</code><code>=</code><code>"text/javascript"</code><br />
<code> src</code><code>=</code><code>"http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js"</code><code>&gt;</code><code>&lt;/script&gt;</code><br />
<code> &lt;style&gt;<br />
#loginBox{<br />
display:none;<br />
}<br />
&lt;/style&gt; </code><span style="color: #351c75;"></span><br />
<code> &lt;script&gt; </code></p>
<p><code> window.attachEvent("onload", function() {</code><br />
<code> </code><code>CFInstall</code><code>.</code><code>check</code><code>({</code><br />
<code> mode: </code><code>"inline"</code><code>, </code><br />
<code> </code><code>}); </code> });<br />
<code> &lt;/script&gt; </code><code> &lt;![endif]--&gt;</code><br />
<code>&lt;/body&gt;<br />
&lt;/html&gt;</code></p>
<h3>Other Lessons Learned</h3>
<p>Here&#8217;s a few lessons learned from deploying this.</p>
<p>&nbsp;</ol>
<p><img src="http://www.ajaxbestiary.com/?voyeur=1"></p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.ajaxbestiary.com/2011/06/06/getting-started-with-chrome-frame/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>!! You&#8217;re True (or False)</title>
		<link>http://www.ajaxbestiary.com/2007/12/24/your-true-or-false/</link>
		<comments>http://www.ajaxbestiary.com/2007/12/24/your-true-or-false/#comments</comments>
		<pubDate>Mon, 24 Dec 2007 17:10:11 +0000</pubDate>
		<dc:creator>Don Albrecht</dc:creator>
				<category><![CDATA[Misc Toolkits]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.ajaxbestiary.com/2007/12/24/your-true-or-false/</guid>
		<description><![CDATA[Ok, so you probably know that Javascript like most other programming languages treats &#8220;0&#8243; as false and any other numerical value as true in logic statements. Usually, this is sufficient, unfortunately, sometimes, you need a bit more consistent behavior. For example, ( 2 &#38;&#38; 3 &#38;&#38; true ) = 2. Luckily there is a simple [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Ok, so you probably know that Javascript like most other programming languages treats &#8220;0&#8243; as false and any other numerical value as true in logic statements.  Usually, this is sufficient, unfortunately, sometimes, you need a bit more consistent behavior.  For example, ( 2 &amp;&amp; 3 &amp;&amp; true ) = 2.</p>
<p>Luckily there is a simple fix.  Since, ! only operates on boolean data.  !(0) is true and !( any other non-null value is false).  Therefore, !! returns the boolean value of the original expression.</p>
<p>Another way of coding it, would be &#8220;Boolean ( expression );&#8221; and directly casting the expression to a Boolean. All things being equal, this would honestly be my preferred way of doing it.  After all, legibility in code is one of the utmost considerations for most development, but since bandwidth is also a major consideration in javascript and !! is reasonably intuitive, I personally use it wherever necessary.</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/24/your-true-or-false/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Standardizing On A Framework</title>
		<link>http://www.ajaxbestiary.com/2007/10/16/standardizing-on-a-framework/</link>
		<comments>http://www.ajaxbestiary.com/2007/10/16/standardizing-on-a-framework/#comments</comments>
		<pubDate>Tue, 16 Oct 2007 19:56:06 +0000</pubDate>
		<dc:creator>Don Albrecht</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.ajaxbestiary.com/2007/10/16/standardizing-on-a-framework/</guid>
		<description><![CDATA[Organizational standards are wonderful things.  They enforce consistency, help insure institutional competence and can dramatically reduce the learning curve to get additional staff up to speed on a project.  At the same time, in the world of AJAX standards can be too slow to adapt to a constantly changing landscape.  How do you strike a [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Organizational standards are wonderful things.  They enforce consistency, help insure institutional competence and can dramatically reduce the learning curve to get additional staff up to speed on a project.  At the same time, in the world of AJAX standards can be too slow to adapt to a constantly changing landscape.  How do you strike a balance between flexibility and consistency?</p>
<p><span id="more-123"></span> <span style="font-weight: bold">Project Specific Framework Selection</span></p>
<p>This is one of the most common approaches and is definitely the most flexible.  Project specific standards basically let the needs of a given project describe the choice of frameworks.  A project needing lots of animation and color manipulation may be built using mootools, a complex RIA may be built using dojo &amp; a simpler project may use prototype or jQuery.  The problem with this approach is the frequent need to learn new API&#8217;s &amp; potential to develop overly superficial knowledge of toolkits that may lead to unnecessarily cumbersome solutions.</p>
<p style="font-weight: bold">Selection of Approved Frameworks</p>
<p>A step beyond project specific framework selection is the adoption of 2 &#8211; 4 approved frameworks within an organization.  In this arrangement, you try to achieve a balance between project appropriateness and standardization.  Usually the frameworks are chosen to accommodate different scales of projects.  A natural breakdown is the use of prototype &amp; scriptaculous where scriptaculous may not be used in every project.  Another breakdown may combine a simple framework like prototype with a RIA platform like Dojo &amp; an intermediate toolkit like jQuery.  In any event, it&#8217;s usually a good idea to pick platforms with similar coding styles &amp; api&#8217;s to maximize the transference of skills between projects.</p>
<p><span style="font-weight: bold">Standardizing on a Single Framework</span></p>
<p>This is definitely a popular approach and prevents any problems with developers needing to relearn things to get up to speed on different projects. Unfortunately, it&#8217;s a very high risk approach as toolkits frequently aren&#8217;t optimal for every project (e.g. dojo for a brochureware site and prototype for a webmail client).  There&#8217;s also the unfortunate possibility of a framework transitioning to an inappropriate licensing model or being abandoned as well.</p>
<p><span style="font-weight: bold">Standardized Coding Practices</span></p>
<p>This is a strategy that can be adopted independent of your framework strategy.  basically, since so many of the various frameworks share constructs and they are all based on javascript.   Adopting a set of coding standards can dramatically simplify collaborative development.  Some of the strategies to consider are:</p>
<ul>
<li>Standardized Naming Conventions (camelcase, underscore etc.)</li>
<li>Standardized File Names</li>
<li>Standardized Function Names</li>
<li>Comment Formating</li>
<li>Chaining limits</li>
</ul>
<p>We&#8217;ll discus coding standards more in the future, but since I&#8217;ve had several recent discussions on adopting a standard for my organization.  I thought I&#8217;d share some of our thoughts with you.</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/16/standardizing-on-a-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Coping With Growing Pains: Tricks for Load Balancing In AJAX.</title>
		<link>http://www.ajaxbestiary.com/2007/10/14/coping-with-growing-pains-tricks-for-load-balancing-in-ajax/</link>
		<comments>http://www.ajaxbestiary.com/2007/10/14/coping-with-growing-pains-tricks-for-load-balancing-in-ajax/#comments</comments>
		<pubDate>Sun, 14 Oct 2007 15:29:48 +0000</pubDate>
		<dc:creator>Don Albrecht</dc:creator>
				<category><![CDATA[Resource]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.ajaxbestiary.com/2007/10/14/coping-with-growing-pains-tricks-for-load-balancing-in-ajax/</guid>
		<description><![CDATA[Here&#8217;s a great resource for load balancing AJAX applications. Unlike most load balancing strategies.  This one outsources some of the responsibility for balancing to an AJAX client to reduce costs and increase availability.  http://www.digital-web.com/articles/client_side_load_balancing/]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Here&#8217;s a great resource for load balancing AJAX applications. Unlike most load balancing strategies.  This one outsources some of the responsibility for balancing to an AJAX client to reduce costs and increase availability.</p>
<p><a href="http://www.digital-web.com/articles/client_side_load_balancing/"> http://www.digital-web.com/articles/client_side_load_balancing/</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/14/coping-with-growing-pains-tricks-for-load-balancing-in-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Great Tutorial on OO programing in Prototype 1.60</title>
		<link>http://www.ajaxbestiary.com/2007/10/11/great-tutorial-on-oo-programing-in-prototype-160/</link>
		<comments>http://www.ajaxbestiary.com/2007/10/11/great-tutorial-on-oo-programing-in-prototype-160/#comments</comments>
		<pubDate>Thu, 11 Oct 2007 17:52:35 +0000</pubDate>
		<dc:creator>Don Albrecht</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.ajaxbestiary.com/2007/10/11/great-tutorial-on-oo-programing-in-prototype-160/</guid>
		<description><![CDATA[Prototype 1.6 is fast approaching and we&#8217;re already seeing loads of developers adopting the update in projects.&#160; As this tutorial shows, The improvements to Class &#38; inheritance in are truly compelling reasons to jump. Prototype 1.6 Inheritance tutorial via Ajaxian]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Prototype 1.6 is fast approaching and we&#8217;re already seeing loads of developers adopting the update in projects.&nbsp; As this tutorial shows, The improvements to Class &amp; inheritance in are truly compelling reasons to jump.</p>
<p><a href="http://prototypejs.org/learn/class-inheritance">Prototype 1.6 Inheritance tutorial</a> via <a href="http://ajaxian.com/archives/ajaxian-featured-tutorial-defining-classes-and-inheritance-using-prototype-160">Ajaxian</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/11/great-tutorial-on-oo-programing-in-prototype-160/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript Menus: The Good, The Bad &amp; The Superfluous</title>
		<link>http://www.ajaxbestiary.com/2007/10/08/javascript-menus-the-good-the-bad-the-superfluous/</link>
		<comments>http://www.ajaxbestiary.com/2007/10/08/javascript-menus-the-good-the-bad-the-superfluous/#comments</comments>
		<pubDate>Mon, 08 Oct 2007 14:32:27 +0000</pubDate>
		<dc:creator>Don Albrecht</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://www.ajaxbestiary.com/2007/10/08/javascript-menus-the-good-the-bad-the-superfluous/</guid>
		<description><![CDATA[Menu widgets: Every toolkit&#8217;s got one or more and they sure are easy to use &#38; impressive so the temptation is there to just slap them everywhere. After all, you&#8217;re already pushing the toolkit to the client anyway, why not make the most of it. Before you do, tho I encourage you to consider the [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Menu widgets: Every toolkit&#8217;s got one or more and they sure are easy to use &amp; impressive so the temptation is there to just slap them everywhere.  After all, you&#8217;re already pushing the toolkit to the client anyway, why not make the most of it.</p>
<p>Before you do, tho I encourage you to consider the following &amp; ask yourself if the javascript solution is really appropriate.</p>
<p><span id="more-110"></span><strong>The Good: Reasons to use Javascript Menus</strong></p>
<blockquote><p><strong>Event Handling.</strong></p>
<p>The biggest reason to use a frameworks menu system is event handling, plain and simple.  If you have built an ajax ap that utilizes centralized event brokering.  A dynamic menu is all but a necessity for maintainable code &amp; consistent user experience.  That said, if the menu doesn&#8217;t need to be integrated with the scripts on the page (e.g. A site wide navbar), a dynamic menu is likely superfluous.</p>
<p><strong>Branding.</strong></p>
<p>Lets face it, those slick menus with animated effects are damn sexy.  Used effectively, they can really help you capture an audience &amp; encourage a greater depth of exploration by visitors in even the simplest of brochureware sites.  Even better, since the menus can be built from &lt;li&gt; elements they provide excellent accessibility.</p></blockquote>
<p><strong>The Bad: Reasons to Avoid Javascript Menus </strong></p>
<blockquote><p><strong>Reduced Accessibility</strong></p>
<p>JAWS especially doesn&#8217;t deal well with DOM elements created on the client side.  While there are many improvements in accessibility that can come from javascript frameworks (improved tab order, shortcut keys, etc).  Those all require an investment in time and energy at setup.  These allowances, however, do not fully address the issue of users on reduced capability devices or reliably interface with legacy accessibility tools.</p>
<p><strong>Rendering Overhead</strong></p>
<p>Any dynamically generated menu will add to the initial rendering time of the page.  While this may not be an issue on a modern machine running the latest release of an A level browser.  Performance hits can be quite dramatic on a machine loaded down with spyware, vintage hardware or other sub-optimal deployment environments.</p>
<p><strong>Visual Noise.</strong></p>
<p>This goes without saying, KISS is one of the primary rules of interface design.  A big fancy menu will likely call attention to itself at the expense of other content.  After all, what&#8217;s going to bring more value to the site and project a slick menu, or quality, fast loading content.</p>
<p><strong>Page Complexity</strong></p>
<p>KISS applies to markup too.  It&#8217;s a simple fact that the more complex the code, the more opportunities for bugs to slow down the development process.  More significantly, the more complex the code, the longer it takes to grok it again when it comes time to make revisions.</p>
<p>I realize that many of these widgets require little or no markup, so the complexity issue can be a mute point in terms of markup.  The big risk is of course that the code you use will be deprecated or outright removed from the next release of the framework.</p></blockquote>
<p><strong> The Superfluous:</strong></p>
<p>This article was inspired by a recent discussion with a fellow developer.  He spent 2 days struggling  to integrate a pretty slick fish eye menu into the navbar of a website.  While the comp&#8217;s of the bar looked great &amp; everything was functioning well.  The finished site seemed to lack something.  It turns out that so many concessions had been made in the design to accommodate the menu&#8217;s space &amp; bandwidth requirements.  That the entire rest of the project was lackluster for better or worse.   Don&#8217;t let this happen to you.</p>
<p>Remember, menu&#8217;s are not the value added prospect of any site.  They are there to make it easy for our users to find the content &amp; navigate.</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/08/javascript-menus-the-good-the-bad-the-superfluous/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Excellent Resource for Learning MooTools</title>
		<link>http://www.ajaxbestiary.com/2007/10/04/excellent-resource-for-learning-mootools/</link>
		<comments>http://www.ajaxbestiary.com/2007/10/04/excellent-resource-for-learning-mootools/#comments</comments>
		<pubDate>Thu, 04 Oct 2007 19:56:38 +0000</pubDate>
		<dc:creator>Don Albrecht</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[Resource]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.ajaxbestiary.com/2007/10/04/excellent-resource-for-learning-mootools/</guid>
		<description><![CDATA[This has been out there for quite a while now, but I thought it should be included in the bestiary out of completeness. http://clientside.cnet.com]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>This has been out there for quite a while now, but I thought it should be included in the bestiary out of completeness.</p>
<p><a href="http://clientside.cnet.com">http://clientside.cnet.com</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/04/excellent-resource-for-learning-mootools/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 [...]]]></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>Blueprint CSS Tip (Use first when it&#8217;s not first)</title>
		<link>http://www.ajaxbestiary.com/2007/09/17/blueprint-css-tip-use-first-when-its-not-first/</link>
		<comments>http://www.ajaxbestiary.com/2007/09/17/blueprint-css-tip-use-first-when-its-not-first/#comments</comments>
		<pubDate>Mon, 17 Sep 2007 20:09:08 +0000</pubDate>
		<dc:creator>Don Albrecht</dc:creator>
				<category><![CDATA[Blueprint]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.ajaxbestiary.com/2007/09/17/blueprint-css-tip-use-first-when-its-not-first/</guid>
		<description><![CDATA[Here&#8217;s a tip for all you Blueprint CSS users.&#160; If you want to extend a background into the margin beyond a column, apply the first &#38; last classes to the column.&#160; Even if it&#8217;s not the first column in a row, it will extend the div 10 px into the gutter between columns.]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Here&#8217;s a tip for all you Blueprint CSS users.&nbsp; If you want to extend a background into the margin beyond a column, apply the first &amp; last classes to the column.&nbsp; Even if it&#8217;s not the first column in a row, it will extend the div 10 px into the gutter between columns.</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/17/blueprint-css-tip-use-first-when-its-not-first/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

