<?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>cssgallery.info &#187; Javascript</title>
	<atom:link href="http://cssgallery.info/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://cssgallery.info</link>
	<description>Resources for web and mobile developers</description>
	<lastBuildDate>Mon, 09 Jan 2012 18:54:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to make a glowing menu with MooTools in 3 easy steps</title>
		<link>http://cssgallery.info/how-to-make-a-glowing-menu-with-mootools-in-3-easy-steps/</link>
		<comments>http://cssgallery.info/how-to-make-a-glowing-menu-with-mootools-in-3-easy-steps/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 12:11:17 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[CSS & CSS3]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[MooTools]]></category>
		<category><![CDATA[glowing menu]]></category>
		<category><![CDATA[how to make a menu]]></category>
		<category><![CDATA[javascript menu]]></category>
		<category><![CDATA[mootools tutorial]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=906</guid>
		<description><![CDATA[<h3>Ingredients:</h3> sprites, unorderdered lists, Mootools knowledge.
<h3>Cooking time:</h3> 1 hr
<h3>Result:</h3>
Can be seen on our website -  <a title="Rborn web development agency" href="http://rborn.info" target="_blank">Rborn Web development</a> -  mouse-over the top menu.
<img class="alignnone size-full wp-image-907" title="Rborn web development glowing menu" src="http://cssgallery.info/wp-content/uploads/2010/04/capture-13.png" alt="Rborn web development glowing menu" width="380" height="110" />]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fhow-to-make-a-glowing-menu-with-mootools-in-3-easy-steps%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fhow-to-make-a-glowing-menu-with-mootools-in-3-easy-steps%2F&amp;source=dan_tamas&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><strong>Ingredients:</strong> sprites, unorderdered lists, Mootools knowledge.<br />
<strong>Cooking time:</strong> 1 hr<br />
<strong>The Result:</strong> Can be seen on our   &#8211;  <a href="http://cssgallery.info/wp-content/mootools-glowing-menu/" target="_blank">Demo page</a> &#8211;  mouse-over the top menu.<br />
<img class="alignnone size-full wp-image-907" title="Rborn web development glowing menu" src="http://cssgallery.info/wp-content/uploads/2010/04/capture-13.png" alt="Rborn web development glowing menu" width="380" height="110" /></p>
<h2>Preparation of the Mootools glowing menu</h2>
<p>The menu is a list containing an <strong>A</strong> tag for each menu item. We are using <em>sprites</em> and <em>text-indent:-5000px</em> for accessibility purposes. <strong>The trick</strong> is that we use the image <strong>positioned top for LI</strong> and <strong>bottom for A HREF</strong></p>
<p><img class="alignnone size-full wp-image-908" title="menu sprite" src="http://cssgallery.info/wp-content/uploads/2010/04/capture-23.png" alt="" width="83" height="151" /></p>
<h2>Step 1: cook the HTML code</h2>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;ul id=&quot;mainnav&quot;&gt;
&lt;li&gt;&lt;a href=&quot;/&quot;&gt;home&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;products&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;portfolio&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/blog/&quot;&gt;news&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;contact&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre></div></div>

<h2>Step 2: add the CSS code</h2>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">li<span style="color: #6666ff;">.home</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;../img/home.png&quot;</span><span style="color: #00AA00;">&#41;</span> <span style="color: #000000; font-weight: bold;">top</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
li<span style="color: #6666ff;">.home</span> a <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">29px</span><span style="color: #00AA00;">;</span>background<span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;../img/home.png&quot;</span><span style="color: #00AA00;">&#41;</span> <span style="color: #000000; font-weight: bold;">bottom</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>This is the positioning of the background image I was talking about earlier.<br />
Now the magic of the glowing is made with few lines of code using MooTools.</p>
<h2>Step 3: spice with MooTools code</h2>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'mainnav'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getElements</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'li a'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">item</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #000066; font-weight: bold;">item</span>.<span style="color: #660066;">hasClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'clicked'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">item</span>.<span style="color: #660066;">setStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'opacity'</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0.01</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addEvent</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'mouseenter'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>        
<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">fade</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addEvent</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'mouseleave'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">fade</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0.01</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>The code is triggered either on <strong>domready</strong> event, or put inside a <strong>script</strong> tag just before the body ends  so have the dom loaded and ready to be accessed by javascript.</p>
<p>Basically all we are doing is to get all the <strong>A</strong> tags inside the menu, set the opacity to <strong>0.01</strong> because if you set it to <strong>0</strong> MooTools will add <strong>display:none</strong> to the style and the links won&#8217;t be visible anymore.</p>
<p>Further we play with the <strong>fade</strong> method to increase the <strong>opacity</strong> to <strong>1</strong> or decrease back to <strong>0.01</strong> on the <strong>mouseenter</strong> and <strong>mouseleave</strong> event.</p>
<p>We also check if the menu is active or not &#8211; we are on the menu  page or not &#8211;  verifying if the item has a <strong>class &#8216;clicked&#8217;</strong>, set by the backend. If the item contains this class  we simply leave it alone and the item is <strong>&#8216;on&#8217;</strong> all the time.</p>
<p>That&#8217;s it. Let me know your thoughts.</p>
<p><strong class="spanish">Check the Spanish version of this post:<br />
<a href="http://nosoloweb.es/como-hacer-menu-brillante-mootools/" rel="me">Cómo hacer un menú brillante con MooTools en 3 pasos</a></strong></p>
<div style="clear:both;">&nbsp;</div><div class="shr-publisher-906"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' shr_layout='button_count' shr_showfaces='false' shr_href='http%3A%2F%2Fcssgallery.info%2Fhow-to-make-a-glowing-menu-with-mootools-in-3-easy-steps%2F'></a><a class='shareaholic-fbsend' shr_href='http%3A%2F%2Fcssgallery.info%2Fhow-to-make-a-glowing-menu-with-mootools-in-3-easy-steps%2F'></a><a class='shareaholic-googleplusone' shr_size='medium' shr_count='true' shr_href='http%3A%2F%2Fcssgallery.info%2Fhow-to-make-a-glowing-menu-with-mootools-in-3-easy-steps%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/how-to-make-a-glowing-menu-with-mootools-in-3-easy-steps/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Everything is green with IE9</title>
		<link>http://cssgallery.info/everything-is-green-with-ie9/</link>
		<comments>http://cssgallery.info/everything-is-green-with-ie9/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 11:21:28 +0000</pubDate>
		<dc:creator>Lucica Ibanescu</dc:creator>
				<category><![CDATA[CSS & CSS3]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Submitted news]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[compare]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[IE9]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=750</guid>
		<description><![CDATA[I am sure you all know about Mictosoft's IE9 Testdrive. Its main target was, for now, the developer - in an attempt to showcase the improvements in IE9 and maybe make us be more nice to them and forget how much time we waste with IE6. 

What I was interested as a frontend developer was the the compatibility tables for features like SVG, CSS3 and DOM. And the test results, as per Microsoft's page, are all gorgeous.
<img src="http://cssgallery.info/wp-content/uploads/2010/03/test-results.gif" alt="IE9 testdrive results" title="test-results" width="450" height="105" class="size-full wp-image-751" />]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Feverything-is-green-with-ie9%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Feverything-is-green-with-ie9%2F&amp;source=dan_tamas&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I am sure you all know about Mictosoft&#8217;s IE9 Testdrive. Its main target was, for now, the developer &#8211; in an attempt to showcase the improvements in IE9 and maybe make us be more nice to them and forget how much time we waste with IE6. </p>
<p>What I was interested as a frontend developer was the the compatibility tables for features like SVG, CSS3 and DOM. And the test results, as per Microsoft&#8217;s page, are all gorgeous.<br />
<img src="http://cssgallery.info/wp-content/uploads/2010/03/test-results.gif" alt="IE9 testdrive results" title="test-results" width="450" height="105" class="size-full wp-image-751" /></p>
<p>A more detailed list of supported features can be seen by checking <a href="http://samples.msdn.microsoft.com/ietestcenter/">their website</a> but long story short, everything is green for them and not so green for the other browsers, except CSS3 :nth-child selector and CSS comments<br />
<img src="http://cssgallery.info/wp-content/uploads/2010/03/css3-selectors.gif" alt="CSS3 supported selectors" title="css3-selectors" width="450" height="257" class="alignleft size-full wp-image-752" /></p>
<p>and DOM level 2 style @import inside of @media<br />
<img src="http://cssgallery.info/wp-content/uploads/2010/03/dom-level2.gif" alt="DOM level2 table" title="dom-level2" width="450" height="111" class="alignleft size-full wp-image-753" /></p>
<p>Another very interesting source of information regarding the present and future features supported by the browsers is <a href="http://a.deveria.com/caniuse/">When can I use&#8230;</a>  that also includes HTML5 elements &#8211; I notice IE9 testdrive page is not mentioning anything about HTML5 altough IE9 is expecting to support it in a certain percentage. They have also calculated the support that past and future browsers have for some features and their numbers are like this:<br />
<img src="http://cssgallery.info/wp-content/uploads/2010/03/test-results-website.gif" alt="Test result When can I use" title="test-results-website" width="450" height="79" class="alignleft size-full wp-image-757" /></p>
<p>But you&#8217;d better check their website to see the features they worked with cause there are some differences that worth being taking into account. </p>
<p>We salute Microsofts initiative, altough we would love to see some of these CSS3 borders, backgrounds and selectors embedded in an IE8 update&#8230;cause we all check our statistics&#8230;.</p>
<div style="clear:both;">&nbsp;</div><div class="shr-publisher-750"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' shr_layout='button_count' shr_showfaces='false' shr_href='http%3A%2F%2Fcssgallery.info%2Feverything-is-green-with-ie9%2F'></a><a class='shareaholic-fbsend' shr_href='http%3A%2F%2Fcssgallery.info%2Feverything-is-green-with-ie9%2F'></a><a class='shareaholic-googleplusone' shr_size='medium' shr_count='true' shr_href='http%3A%2F%2Fcssgallery.info%2Feverything-is-green-with-ie9%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/everything-is-green-with-ie9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upload forms &#8211; enhanced</title>
		<link>http://cssgallery.info/upload-forms-enhanced/</link>
		<comments>http://cssgallery.info/upload-forms-enhanced/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 14:04:37 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[MooTools]]></category>
		<category><![CDATA[FancyUpload]]></category>
		<category><![CDATA[file uploader]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[Stickman multiple file uploader]]></category>
		<category><![CDATA[unobtrusive]]></category>
		<category><![CDATA[Upload forms]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=332</guid>
		<description><![CDATA[Upload forms are something we often use in our projects. Sometimes a simple upload form is not enough, so I'll try to compile a list with <strong>enhanced file upload forms</strong> that help us to improve the look, functionality and usability of our sites.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fupload-forms-enhanced%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fupload-forms-enhanced%2F&amp;source=dan_tamas&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Upload forms are something we often use in our projects. Sometimes a simple upload form is not enough, so I&#8217;ll try to compile a list with <strong>enhanced file upload forms</strong> that help us to improve the look, functionality and usability of our sites.</p>
<h2><a title="Stickman multiple=" href="http://the-stickman.com/web-development/javascript/multiple-file-uploader-mootools-version/" target="_blank">Stickman multiple file uploader</a></h2>
<p><img class="alignnone size-full wp-image-333" title="capture-11" src="http://cssgallery.info/wp-content/uploads/2009/02/capture-11.png" alt="capture-11" width="336" height="115" /></p>
<p>The linked version is Mootools v1.2 based but there is a version for v1.1 and also one framework independent.</p>
<p>The script allows you to add multiple files in a nice form,multiple forms in the same page, and customization.</p>
<h2><a rel="bookmark" href="http://digitarald.de/project/fancyupload/">FancyUpload &#8211; Swiff meets Ajax <small>(v3.0)</small></a></h2>
<p>Flash+Mootools unobtrusive upload form.</p>
<p><img class="alignnone size-full wp-image-749" title="capture-2" src="http://cssgallery.info/wp-content/uploads/2010/02/capture-2.png" alt="" width="471" height="221" /> </p>
<ul>
<li>Select and upload <strong>multiple files</strong></li>
<li>Filter files by type in the select dialog</li>
<li>Optional Events to add your own behavior</li>
<li>Show and filter useful file information before the upload starts</li>
<li>Limit uploads by file count and/or file size</li>
<li>Platform and <em>server independent</em>, just needs Flash 9+ (&gt; 95% penetration)</li>
<li><strong>Unobtrusive</strong>, since the element is replaced after the swf loaded successfully</li>
<li>Cancel running uploads, add files during upload</li>
<li>Everything is optional, documented and easy editable</li>
<li><strong>New in 2.0</strong>
<ul>
<li>Get the server response after upload for showing additional information or previewing the image, etc.</li>
<li>Shows the current upload speed and the time left</li>
<li>Send additional request data via GET or POST variables</li>
<li>Set the filename for the upload request</li>
</ul>
</li>
</ul>
<h2><a title="Ajax file upload" rel="bookmark" href="http://valums.com/ajax-upload/">Ajax file upload</a></h2>
<p>Jquery and Prototype versions available.<br />
<img class="alignnone size-full wp-image-335" title="capture-31" src="http://cssgallery.info/wp-content/uploads/2009/02/capture-31.png" alt="capture-31" width="324" height="232" /> </p>
<div style="clear:both;">&nbsp;</div><div class="shr-publisher-332"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' shr_layout='button_count' shr_showfaces='false' shr_href='http%3A%2F%2Fcssgallery.info%2Fupload-forms-enhanced%2F'></a><a class='shareaholic-fbsend' shr_href='http%3A%2F%2Fcssgallery.info%2Fupload-forms-enhanced%2F'></a><a class='shareaholic-googleplusone' shr_size='medium' shr_count='true' shr_href='http%3A%2F%2Fcssgallery.info%2Fupload-forms-enhanced%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->

<h3>Related posts:</h3><ol><li><a href='http://cssgallery.info/how-to-make-a-glowing-menu-with-mootools-in-3-easy-steps/' rel='bookmark' title='How to make a glowing menu with MooTools in 3 easy steps'>How to make a glowing menu with MooTools in 3 easy steps</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/upload-forms-enhanced/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Website of the day : downloadify.info</title>
		<link>http://cssgallery.info/website-of-the-day-downloadify-info/</link>
		<comments>http://cssgallery.info/website-of-the-day-downloadify-info/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 11:49:36 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Development tools]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Website of the day]]></category>
		<category><![CDATA[clientside persistent storage script]]></category>
		<category><![CDATA[downloadify]]></category>
		<category><![CDATA[Flash library]]></category>
		<category><![CDATA[JavaScript library]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=715</guid>
		<description><![CDATA[Why? Because &#8220;Downloadify is a tiny JavaScript + Flash library that enables the generation and saving of files on the fly, in the browser, without server interaction.&#8221; You can generate in the client side, with no server interaction files that can be saved on the user&#8217;s computer. Think about this: Downloadify, a clientside persistent storage [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fwebsite-of-the-day-downloadify-info%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fwebsite-of-the-day-downloadify-info%2F&amp;source=dan_tamas&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Why?</p>
<p>Because &#8220;<a href="http://downloadify.info/" target="_blank">Downloadify</a> is a tiny JavaScript + Flash library that enables the generation and saving of files on the fly, in the browser, without server interaction.&#8221;</p>
<p><img class="alignnone size-full wp-image-716" title="capture-1" src="http://cssgallery.info/wp-content/uploads/2009/11/capture-12.png" alt="capture-1" width="450" height="253" /></p>
<p>You can generate in the client side, with no server interaction files that can be saved on the user&#8217;s computer.</p>
<p>Think about this:</p>
<p>Downloadify, a clientside persistent storage script ( like <a href="http://pablotron.org/software/persist-js/" target="_blank">persistjs</a> or <a href="http://brianleroux.github.com/lawnchair/" target="_blank">lawnchair</a>), some manifest file for html5 cache  and of course a capable browser , and you have a full offline webapp capable of saving files to local disk and that can be syncronized with the server when internet is available.</p>
<div style="clear:both;">&nbsp;</div><div class="shr-publisher-715"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' shr_layout='button_count' shr_showfaces='false' shr_href='http%3A%2F%2Fcssgallery.info%2Fwebsite-of-the-day-downloadify-info%2F'></a><a class='shareaholic-fbsend' shr_href='http%3A%2F%2Fcssgallery.info%2Fwebsite-of-the-day-downloadify-info%2F'></a><a class='shareaholic-googleplusone' shr_size='medium' shr_count='true' shr_href='http%3A%2F%2Fcssgallery.info%2Fwebsite-of-the-day-downloadify-info%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/website-of-the-day-downloadify-info/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter on your site via javascript</title>
		<link>http://cssgallery.info/twitter-on-your-site-via-javascript/</link>
		<comments>http://cssgallery.info/twitter-on-your-site-via-javascript/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 13:35:29 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[MooTools Request.Twitter]]></category>
		<category><![CDATA[Remy Sharp's twitter.js]]></category>
		<category><![CDATA[tweets]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=628</guid>
		<description><![CDATA[Twitter needs no presentation, and the fact that many webmasters include their posts on their sites either. This can be done in may ways, using  the Twitter API. One easy way is javascript. Thanks to some libraries you need few lines of code, and, because all is client-side you have  zero load on the server. [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Ftwitter-on-your-site-via-javascript%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Ftwitter-on-your-site-via-javascript%2F&amp;source=dan_tamas&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Twitter needs no presentation, and the fact that many webmasters include their posts on their sites either. This can be done in may ways, using  the <a href="http://apiwiki.twitter.com/" target="_blank">Twitter API</a>. One easy way is javascript. Thanks to some libraries you need few lines of code, and, because all is client-side you have  zero load on the server.</p>
<p><strong>The following scripts may help you accomplish this:</strong></p>
<p><a href="http://remysharp.com/2007/05/18/add-twitter-to-your-blog-step-by-step/" target="_blank">Remy Sharp&#8217;s twitter.js</a></p>
<p>The page includes step by step instructions, form setting up the script until the html markup. A nice feature is that is also hosted on googlecode, so you can take it form here, and have always the latest version.</p>
<p><img class="alignnone size-full wp-image-629" title="capture-2" src="http://cssgallery.info/wp-content/uploads/2009/10/capture-23.png" alt="capture-2" width="445" height="211" /></p>
<p><a href="http://tweet.seaofclouds.com/" target="_self">Tweet!</a></p>
<p>jQuery based. MIT-licensed.</p>
<ul style="margin-bottom: 1em; padding-left: 2em;">
<li style="list-style-type: square; margin-left: 0px;">small size and fast download time</li>
<li style="list-style-type: square; margin-left: 0px;">will not slow down or pause your page while tweets are loading</li>
<li style="list-style-type: square; margin-left: 0px;">display up to 100 tweets, as permitted by the twitter search api</li>
<li style="list-style-type: square; margin-left: 0px;">display tweets from a twitter search, or from your own feed</li>
<li style="list-style-type: square; margin-left: 0px;">optional verb tense matching, for human readable tweets</li>
<li style="list-style-type: square; margin-left: 0px;">optionally display your avatar</li>
<li style="list-style-type: square; margin-left: 0px;">optionally display tweets from multiple accounts!</li>
<li style="list-style-type: square; margin-left: 0px;">automatic linking of @replies to users’ twitter page</li>
<li style="list-style-type: square; margin-left: 0px;">automatic linking of URLs</li>
<li style="list-style-type: square; margin-left: 0px;">uses Twitter&#8217;s Search API, so you can display any tweets you like</li>
<li style="list-style-type: square; margin-left: 0px;">automatic linking of #hashtags, to a twitter search of all your tags</li>
<li style="list-style-type: square; margin-left: 0px;">converts &lt;3 to a css styleable <tt>?</tt> (we ? hearts)</li>
<li style="list-style-type: square; margin-left: 0px;">makes awesome text, AWESOME text with AWESOMEIZER</li>
<li style="list-style-type: square; margin-left: 0px;">customize the style with your own stylesheet or with other jquery plugins</li>
<li style="list-style-type: square; margin-left: 0px;">compatible with most jquery versions, including jquery 1.2.6 and the latest, 1.3.x</li>
</ul>
<p><img class="alignnone size-full wp-image-630" title="capture-3" src="http://cssgallery.info/wp-content/uploads/2009/10/capture-33.png" alt="capture-3" width="445" height="211" /></p>
<p><a href="http://appden.com/javascript/get-tweets-with-mootools/" target="_blank">MooTools Request.Twitter</a></p>
<p><a href="http://appden.com/javascript/get-tweets-with-mootools/" target="_blank"></a>Not for newbies, but saves you form using another js on your page, in case you&#8217;re mootools based <img src='http://cssgallery.info/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><img class="alignnone size-full wp-image-631" title="capture-4" src="http://cssgallery.info/wp-content/uploads/2009/10/capture-42.png" alt="capture-4" width="445" height="211" /></p>
<p><a href="http://tutorialzine.com/2009/10/jquery-twitter-ticker/" target="_blank">A complete Tutorial</a></p>
<p>This is not a script, even if you can copy/paste the code, but a full tutorial how to create a ticker for your site. If you want to learn this is a very good start. jQuery please.</p>
<p><img class="alignnone size-full wp-image-633" title="capture-5" src="http://cssgallery.info/wp-content/uploads/2009/10/capture-52.png" alt="capture-5" width="445" height="211" /></p>
<div style="clear:both;">&nbsp;</div><div class="shr-publisher-628"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' shr_layout='button_count' shr_showfaces='false' shr_href='http%3A%2F%2Fcssgallery.info%2Ftwitter-on-your-site-via-javascript%2F'></a><a class='shareaholic-fbsend' shr_href='http%3A%2F%2Fcssgallery.info%2Ftwitter-on-your-site-via-javascript%2F'></a><a class='shareaholic-googleplusone' shr_size='medium' shr_count='true' shr_href='http%3A%2F%2Fcssgallery.info%2Ftwitter-on-your-site-via-javascript%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/twitter-on-your-site-via-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Graph scripts &#8211; part 1 &#8211;  javascript</title>
		<link>http://cssgallery.info/graph-scripts-part-1-javascript/</link>
		<comments>http://cssgallery.info/graph-scripts-part-1-javascript/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 11:17:22 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Development tools]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Bar chart]]></category>
		<category><![CDATA[Bi-polar chart]]></category>
		<category><![CDATA[Bluff]]></category>
		<category><![CDATA[Canvas 3d graph]]></category>
		<category><![CDATA[Donut chart]]></category>
		<category><![CDATA[Funnel chart]]></category>
		<category><![CDATA[Gantt chart]]></category>
		<category><![CDATA[graph scripts]]></category>
		<category><![CDATA[gRaphaël]]></category>
		<category><![CDATA[Horizontal Bar chart]]></category>
		<category><![CDATA[jQuery visualize plugin]]></category>
		<category><![CDATA[LED grid]]></category>
		<category><![CDATA[Line chart]]></category>
		<category><![CDATA[MooChart]]></category>
		<category><![CDATA[Odometer]]></category>
		<category><![CDATA[Pie chart]]></category>
		<category><![CDATA[Progress bar]]></category>
		<category><![CDATA[Pseudo radar chart]]></category>
		<category><![CDATA[RGraph]]></category>
		<category><![CDATA[Scatter chart]]></category>
		<category><![CDATA[Traditional radar chart.]]></category>
		<category><![CDATA[TufteGraph]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=611</guid>
		<description><![CDATA[Today I will try to add more resources on the Javascript graphs utilities to create attractive and more intuitive data sets presentations( graphs ). RGraph HTML5 &#8211; graph library &#8211; yes HTML5 so IE users &#8211; change your browser, or use google frame. The library uses the latest CANVAS features and is fully documented on the site. [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fgraph-scripts-part-1-javascript%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fgraph-scripts-part-1-javascript%2F&amp;source=dan_tamas&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Today I will try to add more resources on the <a title="Javascript graphs" rel="bookmark" href="http://cssgallery.info/javascript-graphs/">Javascript graphs</a> utilities to create attractive and more intuitive data sets presentations( graphs ).</p>
<p><a href="http://www.rgraph.net/" target="_blank">RGraph</a></p>
<p>HTML5 &#8211; graph library &#8211; yes HTML5 so IE users &#8211; change your browser, or use google frame. The library uses the latest CANVAS features and is fully documented on the site. It has a large variety of outputs:</p>
<p>Bar chart, Bi-polar chart, Donut chart, Funnel chart, Gantt chart, Horizontal Bar chart, LED grid, Line chart,Odometer, Pie chart, Progress bar, Pseudo radar chart, Scatter chart, Traditional radar chart.</p>
<p><img class="alignnone size-full wp-image-615" title="RGraph" src="http://cssgallery.info/wp-content/uploads/2009/10/capture-15.png" alt="RGraph" width="445" height="211" /></p>
<p><a href="http://bluff.jcoglan.com/" target="_blank">Bluff</a></p>
<p>Another script that is based on CANVAS, only that this time can use the excanvas from google, to support IE. Is a &#8220;translation&#8221; of a ruby graphing library named Gruff.</p>
<p><img class="alignnone size-full wp-image-617" title="capture-2" src="http://cssgallery.info/wp-content/uploads/2009/10/capture-22.png" alt="capture-2" width="445" height="211" /></p>
<p><strong>The following two libraries use jQuery:</strong></p>
<p><a href="http://www.filamentgroup.com/lab/jquery_visualize_plugin_accessible_charts_graphs_from_tables_html5_canvas/">jQuery visualize plugin</a></p>
<p>Very simple to implement &#8211;  it gets it&#8217;s data from a table and even allows interactive data input.</p>
<p><img class="alignnone size-full wp-image-618" title="capture-3" src="http://cssgallery.info/wp-content/uploads/2009/10/capture-32.png" alt="capture-3" width="445" height="211" /></p>
<p><a href="http://xaviershay.github.com/tufte-graph/" target="_blank">TufteGraph</a></p>
<p>It is different from other javascript charting libraries because:</p>
<p>- Configuration is by dynamic functions, allowing for really compact API (very few options)</p>
<p>- Non-core layout is done via CSS rather than code</p>
<p>It&#8217;s fully tested on Safari3 and Firefox3 only</p>
<p><img class="alignnone size-full wp-image-619" title="capture-4" src="http://cssgallery.info/wp-content/uploads/2009/10/capture-41.png" alt="capture-4" width="445" height="211" /></p>
<p><a href="http://moochart.coneri.se/" target="_blank">MooChart</a></p>
<p>Mootools based, it draws a bubble diagram using canvas, and can animate it. There is a nice demo on the script site.</p>
<p><img class="alignnone size-full wp-image-620" title="capture-5" src="http://cssgallery.info/wp-content/uploads/2009/10/capture-51.png" alt="capture-5" width="445" height="211" /></p>
<p><a href="http://dragan.yourtree.org/code/canvas-3d-graph/">Canvas 3d graph</a></p>
<p>Exactly what it says &#8211;  bar graphing but in 3D.</p>
<p><img class="alignnone size-full wp-image-621" title="capture-6" src="http://cssgallery.info/wp-content/uploads/2009/10/capture-61.png" alt="capture-6" width="445" height="211" /></p>
<p><a href="http://g.raphaeljs.com/" target="_blank">gRaphaël</a></p>
<p>Charting library based on Raphael. Cross browser interactive or static graphs.</p>
<p><img class="alignnone size-full wp-image-622" title="capture-7" src="http://cssgallery.info/wp-content/uploads/2009/10/capture-7.png" alt="capture-7" width="450" height="181" /></p>
<p>Do you know more?</p>
<p>Let me know.</p>
<p><strong>We have an update</strong>, thanks to <a href="http://github.com/Kilian/ico" target="_blank">Kilian</a>, who seems that created a new graph library for prototype users. It renders the graphs with Raphael, so  is cross-browser, and I must admit it looks pretty. Below is a screenshot:</p>
<p><img class="alignnone size-full wp-image-626" title="capture-1" src="http://cssgallery.info/wp-content/uploads/2009/10/capture-16.png" alt="capture-1" width="445" height="211" /></p>
<p>If you have your own libraries, or you  know others not specified here, you can submit it here.</p>
<p>I will update this post as many times as I&#8217;ll receive news from you.</p>
<div style="clear:both;">&nbsp;</div><div class="shr-publisher-611"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' shr_layout='button_count' shr_showfaces='false' shr_href='http%3A%2F%2Fcssgallery.info%2Fgraph-scripts-part-1-javascript%2F'></a><a class='shareaholic-fbsend' shr_href='http%3A%2F%2Fcssgallery.info%2Fgraph-scripts-part-1-javascript%2F'></a><a class='shareaholic-googleplusone' shr_size='medium' shr_count='true' shr_href='http%3A%2F%2Fcssgallery.info%2Fgraph-scripts-part-1-javascript%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/graph-scripts-part-1-javascript/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Good for you you&#8217;re coding accessible websites, but do you actually know any blind user?</title>
		<link>http://cssgallery.info/good-for-you-youre-coding-accessible-websites-but-do-you-actually-know-any-blind-user/</link>
		<comments>http://cssgallery.info/good-for-you-youre-coding-accessible-websites-but-do-you-actually-know-any-blind-user/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 11:44:47 +0000</pubDate>
		<dc:creator>Lucica Ibanescu</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[accessible]]></category>
		<category><![CDATA[accessible websites]]></category>
		<category><![CDATA[assistive technologies]]></category>
		<category><![CDATA[detect blind users]]></category>
		<category><![CDATA[detect user agents]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=470</guid>
		<description><![CDATA[What can you answer to your client when you try to explain that your code is W3c, semantic, crossbrowser and&#8230;accessible and your client asks you &#8220;Good for you you&#8217;re coding accessible websites, but do you actually know any blind user?&#8221; Meaning, why should someone care about how you code a site as long as table-based [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fgood-for-you-youre-coding-accessible-websites-but-do-you-actually-know-any-blind-user%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fgood-for-you-youre-coding-accessible-websites-but-do-you-actually-know-any-blind-user%2F&amp;source=dan_tamas&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>What can you answer to your client when you try to explain that your code is W3c, semantic, crossbrowser and&#8230;accessible  and your client asks you <em>&#8220;Good for you you&#8217;re coding accessible websites, but do you actually know any blind user?&#8221;</em> Meaning, why should someone care about how you code a site as long as table-based code is still ok and cheap?</p>
<p>Well&#8230;you may remain speechless. Cause I really don&#8217;t know any blind person nor a person using assistive technology altough I do know people that need to increase the font-size or lower the screen resolution to be able to read better. But even if I did not &#8220;see&#8221; one that should not mean they don&#8217;t exist &#8211; but how can this be proved?</p>
<p>Since assistive technologies do not leave traces, maybe a solution is to see who&#8217;s clicking the a+ a++ buttons. This surely will leave some trace, right?</p>
<p>So we started an experiment: we wrote a script counting the number of clicks performed on the a+ a++ buttons (I know it&#8217;s not very scientific &#8211; anyone can click &#8211; but we&#8217;re counting on the fact that our users do not know about the experiment and that at least a small percentage of the clicks will be genuine). Every click is counted and written in a file. We compare it to the Google Analytics stats and hope to obtain some information about this aspect of the sites.</p>
<p>After a month of comparing both methods we saw that the a+/ a++ navigation was clicked on a daily basis (even though one site was selling Christmas decorations !!! ) and most of the time a++ was the star ! Between 5% and 8% of the visitors were clicking these links and that is more than the number of clicks on &#8220;about&#8221; or &#8220;contact&#8221; links.</p>
<p>Now, the question that started this article remains &#8211; what is the best answer for the client asking  &#8220;Good for you you&#8217;re coding accessible websites, but do you actually know any blind user?&#8221;</p>
<div style="clear:both;">&nbsp;</div><div class="shr-publisher-470"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' shr_layout='button_count' shr_showfaces='false' shr_href='http%3A%2F%2Fcssgallery.info%2Fgood-for-you-youre-coding-accessible-websites-but-do-you-actually-know-any-blind-user%2F'></a><a class='shareaholic-fbsend' shr_href='http%3A%2F%2Fcssgallery.info%2Fgood-for-you-youre-coding-accessible-websites-but-do-you-actually-know-any-blind-user%2F'></a><a class='shareaholic-googleplusone' shr_size='medium' shr_count='true' shr_href='http%3A%2F%2Fcssgallery.info%2Fgood-for-you-youre-coding-accessible-websites-but-do-you-actually-know-any-blind-user%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/good-for-you-youre-coding-accessible-websites-but-do-you-actually-know-any-blind-user/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Clientside validation for accessible forms with mootools</title>
		<link>http://cssgallery.info/clientside-validation-for-accessible-forms-with-mootools/</link>
		<comments>http://cssgallery.info/clientside-validation-for-accessible-forms-with-mootools/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 17:11:27 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[MooTools]]></category>
		<category><![CDATA[accessible forms]]></category>
		<category><![CDATA[class required]]></category>
		<category><![CDATA[clientside validation]]></category>
		<category><![CDATA[form validator class]]></category>
		<category><![CDATA[javascript validation]]></category>
		<category><![CDATA[mootools validation]]></category>
		<category><![CDATA[validate forms]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=421</guid>
		<description><![CDATA[Validate forms client side with MooTools.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fclientside-validation-for-accessible-forms-with-mootools%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fclientside-validation-for-accessible-forms-with-mootools%2F&amp;source=dan_tamas&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>As we discussed in a previous article about forms -<a title="Basic copy-paste accessible contact form" rel="bookmark" href="http://cssgallery.info/basic-copy-paste-accessible-contact-form/">Basic copy-paste accessible contact form</a> -  we made the form validation accessible using a class that will highlight and point to the elements that need to be filled or corrected in case the validation failed.</p>
<p>Now, the only weak point form the user&#8217;s point of view is the fact that we need to refresh the page every time he hits submit, this being somehow annoying. Nowadays most browsers offer a client-side processing capabilities ( javascript ) that can be used for local validation &#8211; avoiding the refresh of the page.</p>
<p>Don&#8217;t get me wrong. The server side part needs to remain intact for accessibility purposes. </p>
<p>The last MooTools version offers a validation plugin in the mootools-more package, that will help us to solve our task. Basicaly we need to add some classes to out inputs, to reflect the type of validation we want. For our form, we need only name &#8211; mandatory, and email &#8211;  mandatory + correct email formating.</p>
<p>So we&#8217;ll use <strong>required</strong> and <strong>validate-email</strong> from the <a title="Mootools validators" href="http://mootools.net/docs/more/Forms/FormValidator#Validators" target="_blank">list of the validators</a> already included, like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;label for=&quot;name&quot;&gt; Name &lt;span&gt; (required) &lt;/span&gt;&lt;/label&gt;
&lt;input  tabindex=&quot;1&quot; type=&quot;text&quot; name=&quot;name&quot; id=&quot;name&quot; class=&quot;required&quot; /&gt;
&lt;label for=&quot;mail&quot;&gt; Email &lt;span&gt; (required)&lt;/span&gt;&lt;/label&gt;
&lt;input  tabindex=&quot;2&quot; type=&quot;text&quot; name=&quot;mail&quot; id=&quot;mail&quot; class=&quot;validate-email required&quot; /&gt;</pre></div></div>

<h2>The next step is to create the code that does the validation:</h2>
<p>On the <strong>domready</strong> event of the window (we need to allow the html to load and therefore to be able to access it)  we attach the validator to our form with the methods needed to show the user what he did wrong (in case he did it). To keep the presentation and the accessibility intact &#8211; as in the back-end validation &#8211; we  will add the next code:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">window.<span style="color: #660066;">addEvent</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'domready'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> myFormValidator <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> FormValidator<span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'contact'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>
		onFormValidate<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>ok<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'error_wrapper'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getElements</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">dispose</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>ok<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'contact'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getElements</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.validation-failed'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>el<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					<span style="color: #003366; font-weight: bold;">var</span> a <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Element<span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">&quot;a&quot;</span><span style="color: #339933;">,</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">'href'</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;#add&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>
                            .<span style="color: #660066;">addEvent</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> el.<span style="color: #000066;">focus</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>
                            .<span style="color: #660066;">set</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'text'</span><span style="color: #339933;">,</span> el.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'id'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">capitalize</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
                            .<span style="color: #660066;">inject</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'error_wrapper'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>
&nbsp;
				$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'error_wrapper'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'display'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'block'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
			<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
				$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'error_wrapper'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">setStyle</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'display'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'none'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
		stopOnFailure<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
		evaluateFieldsOnBlur<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">false</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>Ok, it&#8217;s a little long but basically it&#8217;s validating each field it needs to, as specified in the class, and  attach in the error_wrapper the labels to the erroneous inputs.  It&#8217;s better  to study the code and see exactly how it&#8217;s done.</p>
<p><strong>Now, what is happening?</strong></p>
<p>The MooTools library is validating each field we specified on the <strong>submit event</strong> of the form and adds by default a class <strong>validation-failed</strong> or <strong>validation-passed</strong> to each field that was submitted to the validation routine.</p>
<p>We can use these two classes to visually improve the form &#8211;  here I just made the faulty ones red. If the validation failed the <strong>submit event</strong> of the form is stopped  and the incomplete data is not reaching the server.</p>
<p><strong>Next step:</strong> to complete the correct data, and resubmit.</p>
<p><a href="http://cssgallery.info/wp-content/accessible-contact-form/index_mootools_validation.php">Here is the DEMO</a></p>
<p>The form validator class is more powerful than this so take a look at the documentation on the MooTools site.<br />
Anyway, no matter what you do, <strong>do not forget</strong> to make the server side validation too. It is mandatory for your (server&#8217;s ) security.</p>
<div style="clear:both;">&nbsp;</div><div class="shr-publisher-421"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' shr_layout='button_count' shr_showfaces='false' shr_href='http%3A%2F%2Fcssgallery.info%2Fclientside-validation-for-accessible-forms-with-mootools%2F'></a><a class='shareaholic-fbsend' shr_href='http%3A%2F%2Fcssgallery.info%2Fclientside-validation-for-accessible-forms-with-mootools%2F'></a><a class='shareaholic-googleplusone' shr_size='medium' shr_count='true' shr_href='http%3A%2F%2Fcssgallery.info%2Fclientside-validation-for-accessible-forms-with-mootools%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->

<h3>Related posts:</h3><ol><li><a href='http://cssgallery.info/how-to-make-a-glowing-menu-with-mootools-in-3-easy-steps/' rel='bookmark' title='How to make a glowing menu with MooTools in 3 easy steps'>How to make a glowing menu with MooTools in 3 easy steps</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/clientside-validation-for-accessible-forms-with-mootools/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>LAB.js  &#8211; a nifty little javascript loader</title>
		<link>http://cssgallery.info/labjs-a-nifty-little-javascript-loader/</link>
		<comments>http://cssgallery.info/labjs-a-nifty-little-javascript-loader/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 18:06:03 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Mobile web]]></category>
		<category><![CDATA[javascript loader]]></category>
		<category><![CDATA[Lab.js]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=407</guid>
		<description><![CDATA[LAB.js (Loading And Blocking JavaScript) allows you load in parallel your js scripts , speeding up the process ( sometimes a lot). But also it can force that scripts are loaded in a certain order, so this way no dependencies are broken. The developer declares a 2x speed improvement on his site. On an ondevelopment [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Flabjs-a-nifty-little-javascript-loader%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Flabjs-a-nifty-little-javascript-loader%2F&amp;source=dan_tamas&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a title="lab.js" href="http://labjs.com/" target="_blank">LAB.js</a> (Loading And Blocking JavaScript) allows you load in parallel your js scripts , speeding up the process ( sometimes a lot). But also it can force that scripts are loaded in a certain order, so this way no dependencies are broken.</p>
<p>The developer declares a 2x speed improvement on his site.</p>
<p>On an ondevelopment project , with 9 js scripts and 282k without labjs the page loaded in 8 seconds and with labjs in 2.5. So we have a &gt;3x improvement.</p>
<div style="clear:both;">&nbsp;</div><div class="shr-publisher-407"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' shr_layout='button_count' shr_showfaces='false' shr_href='http%3A%2F%2Fcssgallery.info%2Flabjs-a-nifty-little-javascript-loader%2F'></a><a class='shareaholic-fbsend' shr_href='http%3A%2F%2Fcssgallery.info%2Flabjs-a-nifty-little-javascript-loader%2F'></a><a class='shareaholic-googleplusone' shr_size='medium' shr_count='true' shr_href='http%3A%2F%2Fcssgallery.info%2Flabjs-a-nifty-little-javascript-loader%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/labjs-a-nifty-little-javascript-loader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mootools &#8211; browser sniffing</title>
		<link>http://cssgallery.info/mootools-browser-sniffing/</link>
		<comments>http://cssgallery.info/mootools-browser-sniffing/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 17:12:54 +0000</pubDate>
		<dc:creator>Dan Tamas</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[MooTools]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[browser sniff]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[detect]]></category>
		<category><![CDATA[function $]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://cssgallery.info/?p=344</guid>
		<description><![CDATA[I know, I know, browser sniffing is a bad habit and it should not be used, but still, there are cases when you will want to display a message to the user (ordinary users, that don&#8217;t hack their&#8217;s browser navigator.userAgent) or you really need to know what browser is he using. For example Chrome. It&#8217;ss [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><!--S-ButtonZ 1.1.5 Start--><!--S-ButtonZ 1.1.5 End--><div class="tweetmeme_button" style="float: right; margin: 10px !important;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fcssgallery.info%2Fmootools-browser-sniffing%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fcssgallery.info%2Fmootools-browser-sniffing%2F&amp;source=dan_tamas&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I know, I know, browser sniffing is a bad habit and it should not be used, but still, there are cases when you will want to display a message to the user (ordinary users, that don&#8217;t hack their&#8217;s browser navigator.userAgent)  or you really need to know what browser is he using.</p>
<p>For example Chrome. It&#8217;ss ok, is using webkit, but it&#8217;s not webkit&#8230; transparent png, with opacity set lower then 1 will look just awful in  Chrome.</p>
<p>So I wrote a simple function, &#8220;stealing&#8221; some code from <a href="http://www.quirksmode.org/js/detect.html" target="_blank">PPK.</a></p>
<p>Include <a href="http://cssgallery.info/wp-content/browser_sniff.js" target="_blank">the script</a> in your pages, and it will give you 2 more variables in Browser. Engine:</p>
<p>Browser.Engine.browserName</p>
<p>Browser.Engine.browserVersion</p>
<div style="clear:both;">&nbsp;</div><div class="shr-publisher-344"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' shr_layout='button_count' shr_showfaces='false' shr_href='http%3A%2F%2Fcssgallery.info%2Fmootools-browser-sniffing%2F'></a><a class='shareaholic-fbsend' shr_href='http%3A%2F%2Fcssgallery.info%2Fmootools-browser-sniffing%2F'></a><a class='shareaholic-googleplusone' shr_size='medium' shr_count='true' shr_href='http%3A%2F%2Fcssgallery.info%2Fmootools-browser-sniffing%2F'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->

<h3>Related posts:</h3><ol><li><a href='http://cssgallery.info/how-to-make-a-glowing-menu-with-mootools-in-3-easy-steps/' rel='bookmark' title='How to make a glowing menu with MooTools in 3 easy steps'>How to make a glowing menu with MooTools in 3 easy steps</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://cssgallery.info/mootools-browser-sniffing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic (User is logged in)
Page Caching using disk: basic (User agent is rejected)
Database Caching using disk: basic

Served from: www.cssgallery.info @ 2012-02-04 19:41:22 -->
