<?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>InteRiders &#187; Prototype/JavaScript/Ajax</title>
	<atom:link href="http://www.interiders.com/category/prototypejavascriptajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.interiders.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 19 Feb 2008 17:06:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Proto!MultiSelect 0.2</title>
		<link>http://www.interiders.com/2008/02/18/protomultiselect-02/</link>
		<comments>http://www.interiders.com/2008/02/18/protomultiselect-02/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 02:46:38 +0000</pubDate>
		<dc:creator>EGBlue</dc:creator>
				<category><![CDATA[Prototype/JavaScript/Ajax]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[autosuggest]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[multiselect]]></category>
		<category><![CDATA[Proto!MultiSelect]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[TextboxList]]></category>

		<guid isPermaLink="false">http://www.interiders.com/2008/02/18/protomultiselect-02/</guid>
		<description><![CDATA[ 
Hey everybody. It didn&#8217;t take long before glitches and features were reported, so first of all, i&#8217;d like to thank all of you for taking the time to check out the code and report all the bugs you found, it really helped taking the script further, i&#8217;m sure that the next build will not [...]]]></description>
			<content:encoded><![CDATA[<p> <img src="http://www.interiders.com/wp-content/uploads/2008/02/untitled-1.jpg" alt="untitled-1.jpg" /></p>
<p>Hey everybody. It didn&#8217;t take long before glitches and features were reported, so first of all, i&#8217;d like to thank all of you for taking the time to check out the code and report all the bugs you found, it really helped taking the script further, i&#8217;m sure that the next build will not be perfect and that&#8217;s why your help is still needed to keep checking and suggest new cool features for next versions.</p>
<p>In this build I tried to include all the suggested features, I hope that nobody will be disappointed.  There are also few bug fixes but most features upgrade. I encourage all of you to suggest any features you have in mind, because what might be useful for you, may be useful to others, so please do so..</p>
<p>The new version incorporates few new options:</p>
<ul>
<li><strong>fetchFile &#8211; </strong>default: undefined; a JSON file that is being called with the parameter <em>keyword </em>whenever a key is being typed</li>
<li><strong>results &#8211; </strong>default: 10; the number of results to display before showing a scrollbar, if more results match a scrollbar is displayed</li>
<li><strong>wordMatch &#8211; </strong>default: false; when set to true will match only the beginning of word, otherwise will match anywhere</li>
</ul>
<p>Here is a list of changes on this upcoming build, and by the way, the name has been changed to Proto!MultiSelect in order to avoid confusion with our dearest friend&#8217;s, Guillermo Rauch, project.</p>
<p>- 0.2: renamed from Proto!TextboxList to Proto!MultiSelect, added new features/bug fixes<br />
added feature: support to fetch list on-the-fly using AJAX    Credit: Cheeseroll<br />
added feature: support for value/caption<br />
added feature: maximum results to display, when greater displays a scrollbar   Credit: Marcel<br />
added feature: filter by the beginning of word only or everywhere in the word   Credit: Kiliman<br />
added feature: shows hand cursor when going over options<br />
bug fix: the click event stopped working<br />
bug fix: the cursor does not &#8216;travel&#8217; when going up/down the list   Credit: Marcel</p>
<p><strong>Fixed 02/19/08</strong></p>
<p>A glitch where deleted records are not being re-added to the list. &#8211; suggested by  <strong>Antoine</strong></p>
<p><strong>Demo</strong></p>
<p><a href="http://www.interiders.com/wp-content/demos/ProtoMultiSelect/test.html">Click here for demo</a></p>
<p><strong>Download</strong></p>
<p><a href="http://www.interiders.com/wp-content/uploads/2008/02/protomultiselect.zip" title="protomultiselect.zip">Click here to download<br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.interiders.com/2008/02/18/protomultiselect-02/feed/</wfw:commentRss>
		<slash:comments>132</slash:comments>
		</item>
		<item>
		<title>Proto!TextboxList meets Autocompletion</title>
		<link>http://www.interiders.com/2008/02/11/prototextboxlist-meets-autocompletion/</link>
		<comments>http://www.interiders.com/2008/02/11/prototextboxlist-meets-autocompletion/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 20:05:09 +0000</pubDate>
		<dc:creator>EGBlue</dc:creator>
				<category><![CDATA[Prototype/JavaScript/Ajax]]></category>

		<guid isPermaLink="false">http://www.interiders.com/2008/02/11/prototextboxlist-meets-autocompletion/</guid>
		<description><![CDATA[
This is the Prototype version of the extended script by Guillermo Rauch. As with the previous script, this script has been converted and operates like the original. An extended and upgraded version will be posted later on this week, if you have any comments or requests, please post them and I will try to include [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.interiders.com/wp-content/uploads/2008/02/auto.png" alt="auto.png" /></p>
<p>This is the Prototype version of the extended script by <a href="http://devthought.com/textboxlist-meets-autocompletion/" target="_blank">Guillermo Rauch</a>. As with the previous script, this script has been converted and operates like the original. An extended and upgraded version will be posted later on this week, if you have any comments or requests, please post them and I will try to include all the requested features in the upcoming Proto release.</p>
<p><a href="http://www.interiders.com/wp-content/demos/ProtoAutocompleteList/test.html">Click here to see demo</a></p>
<p>Here is the original post by Guillermo that describes the script:</p>
<p>In my previous blogpost I explained how to extend TextboxList to add closing functionality via a link added to each box. But it was missing an important ingredient: autocompletion!</p>
<p>Again, all we have to do is extend the TextboxList class, override some methods, some events, and create some new ones (all prefixed by auto)</p>
<p>It works by caching all the results from a JSON Request and feeding them to the autocompleter object. When a item is added as a box, it’ removed from the feed array, and when the box is disposed it’s added back, so that it becomes available in the list when the user types.</p>
<p>Another new feature is that you’ll be able to let it add boxes from the HTML directly:</p>
<div class="igBar"><span id="lhtml-2"><a href="#" onclick="javascript:showPlainTxt('html-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-2">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/label.html"><span style="color: #000000; font-weight: bold;">&lt;label&gt;</span></a></span>FacebookList input<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"facebook-demo"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"facebook-auto"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #ddbb00;">&amp;nbsp;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"default"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Type the name of an argentine writer you like<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/ul.html"><span style="color: #000000; font-weight: bold;">&lt;ul</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"feed"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">&lt;li&gt;</span></a></span>Jorge Luis Borges<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">&lt;li&gt;</span></a></span>Julio Cortazar<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ul&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
The constructor now takes new parameters to configure the autocompletion, like the minimum number of characters to trigger the dropdown, and more.</p>
<p><strong>Download</strong></p>
<p><a href="http://www.interiders.com/wp-content/uploads/2008/02/protoautocompletelist.rar" title="script">Click here to download</a> the script</p>
<p><strong>New version is out, <a href="http://www.interiders.com/2008/02/18/protomultiselect-02/">check it out!</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.interiders.com/2008/02/11/prototextboxlist-meets-autocompletion/feed/</wfw:commentRss>
		<slash:comments>78</slash:comments>
		</item>
		<item>
		<title>TextboxList: Fancy Facebook-Like dynamic inputs! Now, in Prototype</title>
		<link>http://www.interiders.com/2008/02/11/textboxlist-fancy-facebook-like-dynamic-inputs-now-in-prototype/</link>
		<comments>http://www.interiders.com/2008/02/11/textboxlist-fancy-facebook-like-dynamic-inputs-now-in-prototype/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 19:26:12 +0000</pubDate>
		<dc:creator>EGBlue</dc:creator>
				<category><![CDATA[Prototype/JavaScript/Ajax]]></category>

		<guid isPermaLink="false">http://www.interiders.com/2008/02/11/textboxlist-fancy-facebook-like-dynamic-inputs-now-in-prototype/</guid>
		<description><![CDATA[ 
Hey everybody, after coming across Guillermo Rauch’s script, I knew i had to port it into my favorite library, Prototype.  In this page you will find the Guillermo's script translated into Prototype. I kept the original formatting and will post it just like he did for the ease of understanding for people who [...]]]></description>
			<content:encoded><![CDATA[<p> <img src="http://www.interiders.com/wp-content/uploads/2008/02/untitled-14.png" alt="untitled-14.png" /></p>
<p>Hey everybody, after coming across <a href="http://devthought.com/textboxlist-fancy-facebook-like-dynamic-inputs/" target="_blank">Guillermo Rauch’s script</a>, I knew i had to port it into my favorite library, Prototype.  In this page you will find the Guillermo's script translated into Prototype. I kept the original formatting and will post it just like he did for the ease of understanding for people who used the original first. Later on this week, I will release an improved version of the script. This post is a conversion of the original deal. The improved script will include more features and implement several improvements. Let me include the original post by Guillermo that describes the script. The post is slightly modified to suite my blog's format. Have fun, and please! report any glitches or feature requests so I will implement those in the improved version, due later on this week.</p>
<p>Original post:</p>
<p>Check <a href="http://www.interiders.com/wp-content/demos/ProtoTextboxList/test.html">out a demo of TextboxList</a> before reading!</p>
<p>While working on my big and exciting new project, I decided to include an input that resembles the famous Apple Mail to: textfield. I’d seen it in Facebook before, which has a really decent implementation of this concept (it work well, but it doesn’t respect any modern programming principles; basically, it’s a big tag soup with lots of inline Javascript)</p>
<p>I created my own, MooTools 1.2 [Now: Prototype] compatible, in just 5kb. It’s not only small, but also really frexible! Here are some notes of the creation process and how to implement it in your own projects.<br />
Anatomy of the control</p>
<p>As usual, I try to come up with a semantic, unobtrusive approach. I start with the CSS and the markup that will be my end result.</p>
<p>I want to go from something like this:</p>
<div class="igBar"><span id="lhtml-6"><a href="#" onclick="javascript:showPlainTxt('html-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-6">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">&lt;li</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"facebook-list"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"input-text"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span> <span style="color: #009900;"><a href="http://december.com/html/4/element/label.html"><span style="color: #000000; font-weight: bold;">&lt;label&gt;</span></a></span>FacebookList input<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"input-demo2"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
to something like this (only one possible scenario, naturally)</p>
<div class="igBar"><span id="lhtml-7"><a href="#" onclick="javascript:showPlainTxt('html-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-7">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">&lt;li</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"facebook-list"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"input-text"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span> <span style="color: #009900;"><a href="http://december.com/html/4/element/label.html"><span style="color: #000000; font-weight: bold;">&lt;label&gt;</span></a></span>FacebookList input<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/ul.html"><span style="color: #000000; font-weight: bold;">&lt;ul</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"holder"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">&lt;li</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"bit-input"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span> <span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"smallinput"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">&lt;li</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"bit-box"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Jorge Luis Borges <span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">&lt;a</span></a> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">"#"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"closebutton"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">&lt;li</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"bit-input"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span> <span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"smallinput"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">&lt;li</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"bit-box"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Julio Cortazar <span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">&lt;a</span></a> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">"#"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"closebutton"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">&lt;li</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"bit-input"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span> <span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"maininput"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ul&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Basically, it’s a group of pieces (that I’ll call bits), that can be either a box or an input (small, except for the main one). The user is able to move around between the bits by using his keyboard or his mouse.<br />
Javascript</p>
<p>As far as the javascript goes, I try to first think about reusable code (usually classes) that I may use. I thus first coded the class that adds resizing capabilities to the small fields as the user types, and a small utility method to find the caret position.</p>
<p>The only challenges I found was handling the complex events while keeping everything crossbrowser. Again, none of this would have been possible if it wasn’t for MooTools (1.2) [Now: Prototype].<br />
Using it</p>
<p>All you have to do is:</p>
<div class="igBar"><span id="ljavascript-8"><a href="#" onclick="javascript:showPlainTxt('javascript-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-8">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">new</span> TextboxList<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'input-demo'</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Where input-demo is the id of the desired input to replace</p>
<p>The constructor can take these options:</p>
<p>* <strong>onInputFocus</strong> (event, fired when an input gets focus)<br />
* <strong>onInputBlur</strong> (event, fired when an input loses focus)<br />
* <strong>onBoxFocus</strong> (event, fired when a box gets focus)<br />
* <strong>onBoxBlur</strong> (event, fired when a box loses focus)<br />
* <strong>onBoxDispose</strong> (event, fired when a box is removed)<br />
* <strong>resizable</strong> (option, hash, passed to ResizableTextbox constructor)<br />
* <strong>className</strong> (option, string, prefix of the classnames of the generated objects)<br />
* <strong>extrainputs</strong> (option, boolean, adds small inputs between boxes if true)<br />
* <strong>startinput</strong> (option, boolean, adds a small input before the first box if true)<br />
* <strong>hideempty</strong> (option, boolean, hides the small inputs by default)</p>
<p><strong>Download</strong></p>
<p><a href="http://www.interiders.com/wp-content/uploads/2008/02/prototextboxlist.rar" title="Script">Click here</a> to download the cool script <img src='http://www.interiders.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.interiders.com/2008/02/11/textboxlist-fancy-facebook-like-dynamic-inputs-now-in-prototype/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
	</channel>
</rss>
