<?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/"
	>

<channel>
	<title>echolibre blog &#187; jquery</title>
	<atom:link href="http://blog.echolibre.com/category/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.echolibre.com</link>
	<description></description>
	<pubDate>Mon, 25 Apr 2011 20:44:15 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to build an API in 5 minutes</title>
		<link>http://blog.echolibre.com/2009/10/how-to-build-an-api-in-5-minutes/</link>
		<comments>http://blog.echolibre.com/2009/10/how-to-build-an-api-in-5-minutes/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 15:44:17 +0000</pubDate>
		<dc:creator>Eamon</dc:creator>
		
		<category><![CDATA[API]]></category>

		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Zend Framework]]></category>

		<category><![CDATA[echolibre]]></category>

		<category><![CDATA[innovation]]></category>

		<category><![CDATA[jquery]]></category>

		<category><![CDATA[python]]></category>

		<category><![CDATA[web3.0]]></category>

		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://blog.echolibre.com/?p=622</guid>
		<description><![CDATA[On Friday evening we quietly announced on twitter a product that we&#8217;ve been working on for the last 10 months. FRAPI is an Open Source API framework that allows you to open up your existing web based application or legacy system to your own or third party developers.
FRAPI handles standard API things like authentication and [...]]]></description>
			<content:encoded><![CDATA[<p>On Friday evening we quietly announced on twitter a product that we&#8217;ve been working on for the last 10 months. <a href="http://www.getfrapi.com">FRAPI is an Open Source API framework</a> that allows you to open up your existing web based application or legacy system to your own or third party developers.</p>
<p>FRAPI handles standard API things like authentication and data formatting, and speeds up the API development process &#8212; like the way ZF or Symfony for PHP, Django for Python, JQuery for JavaScript (or, I suppose even Ruby on Rails ;-p ), does for other technologies.</p>
<p><a title="David Coallier, CTO, echolibre" href="http://www.twitter.com/DavidCoallier">David Coallier</a> put together a quick 5 minute screencast to show you how you can use FRAPI to start building your API.<span id="more-622"></span></p>
<p><object width="480" height="326" data="http://blip.tv/play/AYGk_BoC" type="application/x-shockwave-flash"><param name="src" value="http://blip.tv/play/AYGk_BoC" /><param name="allowfullscreen" value="true" /></object></p>
<p>FRAPI is about to go into closed beta and we already have a nice list of developers building up. If you&#8217;d like to be part of our closed beta release, you can sign up on <a title="FRAPI - An Open Source API Framework" href="http://www.getfrapi.com">getfrapi.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.echolibre.com/2009/10/how-to-build-an-api-in-5-minutes/feed/</wfw:commentRss>
		</item>
		<item>
		<title>jQuery JSON Autocomplete</title>
		<link>http://blog.echolibre.com/2009/06/jquery-json-autocomplete/</link>
		<comments>http://blog.echolibre.com/2009/06/jquery-json-autocomplete/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 12:14:40 +0000</pubDate>
		<dc:creator>David</dc:creator>
		
		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[echolibre]]></category>

		<category><![CDATA[industry]]></category>

		<category><![CDATA[jquery]]></category>

		<category><![CDATA[json]]></category>

		<category><![CDATA[autocomplete]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://blog.echolibre.com/?p=444</guid>
		<description><![CDATA[A number of people have asked me over the past few days how should one go about using jQuery Autocomplete but instead of using newline delimiters, with a URL that returns JSON data.
At first, I first had a hack that involved handling the &#8220;keyup&#8221; event myself then sending a request to a JSON URL, and [...]]]></description>
			<content:encoded><![CDATA[<p>A number of people have asked me over the past few days how should one go about using <a title="jQuery Autocomplete plugin" href="http://www.pengoworks.com/workshop/jquery/autocomplete.htm">jQuery Autocomplete</a> but instead of using newline delimiters, with a URL that returns <a title="Javascript Object Notation" href="http://www.json.org">JSON</a> data.</p>
<p>At first, I first had a hack that involved handling the &#8220;<a title="jquery keyup event." href="http://docs.jquery.com/Events/keyup">keyup</a>&#8221; event myself then sending a request to a JSON URL, and then involve the &#8220;autocompleteArray&#8221; method from Autocomplete. It was a mess considering that the autocomplete method is already sending the value of your defined input to the server as a GET parameter. I was repeating the behavior of the function in order to receive a simple JSON array. I was unhappy, and felt it to be a very annoying solution because I wanted to take advantage of the internal caching system of jQuery Autocomplete.</p>
<p>So I decided to give a look at the code and came up with a much cleaner solution. I directly added a JSON option to the Autocomplete. So for anyone interested you can find the patch here: <a title="jQuery Autocomplete JSON Patch" href="http://labs.echolibre.com/jquery/autocomplete/jquery.autocomplete-json.diff">jQuery Autocomplete JSON patch</a>.</p>
<p><span id="more-444"></span></p>
<p>The first step thing you&#8217;ll need is to patch Autocomplete using the patch command (Google patch) and then include the jQuery and Autocomplete JavaScript sources into your code.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;script type=&quot;text/javascript&quot; src=&quot;jquery.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;jquery.autocomplete.js&quot;&gt;&lt;/script&gt;
&lt;style type=&quot;text/css&quot;&gt;
    @import &quot;jquery.autocomplete.css&quot;;
&lt;/style&gt;</pre></td></tr></table></div>

<p>Once you are done, you need to setup your input field on which the autocomplete calls and function is going to be executed from.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;input type=&quot;text&quot; size=&quot;25&quot; id=&quot;input&quot; /&gt;</pre></td></tr></table></div>

<p>And of course you need to make the event hook to make sure your autocomplete is done but in the hook you need to make sure the new option &#8220;<span style="text-decoration: underline;">json</span>&#8221; is set to <span style="text-decoration: underline;">true</span>. This is how you proceed:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</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: #009900;">&#40;</span><span style="color: #3366CC;">'#input'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">autocomplete</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'url.php'</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>json<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</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><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The complete version should look somewhat like:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
 &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
  &lt;head&gt;
   &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot; /&gt;
   &lt;style type=&quot;text/css&quot;&gt;
       @import &quot;jquery.autocomplete.css&quot;;
   &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
   &lt;label for=&quot;input&quot;&gt;Input any text&lt;/label&gt;
   &lt;input type=&quot;text&quot; id=&quot;input&quot; /&gt;
  &lt;/body&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;jquery.js&quot;&gt;&lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;jquery.autocomplete.js&quot;&gt;&lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot;&gt;
      $(function() {
          $('#input').autocomplete('url.php', {json: true});
      });
  &lt;/script&gt;
&lt;/html&gt;</pre></td></tr></table></div>

<p>You can even <a title="jQuery Autocomplete JSON example" href="http://labs.echolibre.com/jquery/autocomplete/">try it now if you want</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.echolibre.com/2009/06/jquery-json-autocomplete/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

