<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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>Comments on: Autocompletion &#8211; the easy way</title>
	<atom:link href="http://cakebaker.42dh.com/2006/06/06/autocompletion-the-easy-way/feed/" rel="self" type="application/rss+xml" />
	<link>http://cakebaker.42dh.com/2006/06/06/autocompletion-the-easy-way/</link>
	<description>baking cakes with CakePHP</description>
	<lastBuildDate>Thu, 11 Mar 2010 15:41:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2006/06/06/autocompletion-the-easy-way/comment-page-2/#comment-150881</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Mon, 08 Mar 2010 15:26:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=202#comment-150881</guid>
		<description>@Andy: Thanks for your comment, I modified the article accordingly.</description>
		<content:encoded><![CDATA[<p>@Andy: Thanks for your comment, I modified the article accordingly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Potanin</title>
		<link>http://cakebaker.42dh.com/2006/06/06/autocompletion-the-easy-way/comment-page-2/#comment-150050</link>
		<dc:creator>Andy Potanin</dc:creator>
		<pubDate>Fri, 05 Mar 2010 00:27:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=202#comment-150050</guid>
		<description>For any new users having issues with, reference this: http://book.cakephp.org/view/208/AJAX

If you have a brand new setup, you need to download JS libraries and put them into the app/webroot/js folder.

Put the following into your controller:

&lt;code&gt;
	var $components = array(&#039;Autocomplete&#039;);
	var $helpers = array(&#039;Html&#039;, &#039;Javascript&#039;, &#039;Ajax&#039;);
&lt;/code&gt;

and the following into your view file (I put it into my default.ctp file) into the header&quot;:

&lt;code&gt;
&lt;?php
echo $javascript-&gt;link(&#039;prototype&#039;);
echo $javascript-&gt;link(&#039;scriptaculous&#039;);
?&gt;
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>For any new users having issues with, reference this: <a href="http://book.cakephp.org/view/208/AJAX" rel="nofollow">http://book.cakephp.org/view/208/AJAX</a></p>
<p>If you have a brand new setup, you need to download JS libraries and put them into the app/webroot/js folder.</p>
<p>Put the following into your controller:</p>
<pre><code>var $components = array('Autocomplete');
	var $helpers = array('Html', 'Javascript', 'Ajax');</code></pre>
<p>and the following into your view file (I put it into my default.ctp file) into the header&#8221;:</p>
<pre><code>&lt;?php
echo $javascript-&gt;link('prototype');
echo $javascript-&gt;link('scriptaculous');
?&gt;</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: sai</title>
		<link>http://cakebaker.42dh.com/2006/06/06/autocompletion-the-easy-way/comment-page-2/#comment-149488</link>
		<dc:creator>sai</dc:creator>
		<pubDate>Tue, 02 Mar 2010 14:47:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=202#comment-149488</guid>
		<description>Could you please guide me</description>
		<content:encoded><![CDATA[<p>Could you please guide me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sai</title>
		<link>http://cakebaker.42dh.com/2006/06/06/autocompletion-the-easy-way/comment-page-2/#comment-149487</link>
		<dc:creator>sai</dc:creator>
		<pubDate>Tue, 02 Mar 2010 14:46:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=202#comment-149487</guid>
		<description>I have a employee dropdown list in the VIEW-&gt;add.ctp -- when an employee is selected and clicked next
In the next page(same page(add.ctp) or next page(edit.ctp)) it shud display the selected empolyee and his department and salary which are present in the users table. Also there are many other fields to be filled after the department and salary are displayed in this page automatically from the datebase&#039;s users table.
I already have a model and controller. Its actually for a form. everything is working, but now i have to introduce this logic where instead of hand filling the department of an employee. As soon as we select employee the department field in tht page shud be displayed which is present in the user table.</description>
		<content:encoded><![CDATA[<p>I have a employee dropdown list in the VIEW-&gt;add.ctp &#8212; when an employee is selected and clicked next<br />
In the next page(same page(add.ctp) or next page(edit.ctp)) it shud display the selected empolyee and his department and salary which are present in the users table. Also there are many other fields to be filled after the department and salary are displayed in this page automatically from the datebase&#8217;s users table.<br />
I already have a model and controller. Its actually for a form. everything is working, but now i have to introduce this logic where instead of hand filling the department of an employee. As soon as we select employee the department field in tht page shud be displayed which is present in the user table.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2006/06/06/autocompletion-the-easy-way/comment-page-2/#comment-144640</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Wed, 27 Jan 2010 15:18:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=202#comment-144640</guid>
		<description>@Laceja: Well, the autoComplete() method allows you to pass an options array as third parameter. However, &quot;label&quot; and &quot;div&quot; are useless, as an autocomplete field is generated without label and the generated div is necessary for the results.</description>
		<content:encoded><![CDATA[<p>@Laceja: Well, the autoComplete() method allows you to pass an options array as third parameter. However, &#8220;label&#8221; and &#8220;div&#8221; are useless, as an autocomplete field is generated without label and the generated div is necessary for the results.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laceja</title>
		<link>http://cakebaker.42dh.com/2006/06/06/autocompletion-the-easy-way/comment-page-2/#comment-144578</link>
		<dc:creator>Laceja</dc:creator>
		<pubDate>Tue, 26 Jan 2010 17:18:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=202#comment-144578</guid>
		<description>As I recall, the ajax-&gt;autocomplete does not support the &#039;class&#039; =&gt; &#039;short100r3&#039;, &#039;label&#039; =&gt; false,  and &#039;div&#039; =&gt; false properties. I am correct?

I don&#039;t want the control to be in it&#039;s own div, because I&#039;ve got an array of 40 of them. div forces each to its own line.</description>
		<content:encoded><![CDATA[<p>As I recall, the ajax-&gt;autocomplete does not support the &#8216;class&#8217; =&gt; &#8217;short100r3&#8242;, &#8216;label&#8217; =&gt; false,  and &#8216;div&#8217; =&gt; false properties. I am correct?</p>
<p>I don&#8217;t want the control to be in it&#8217;s own div, because I&#8217;ve got an array of 40 of them. div forces each to its own line.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2006/06/06/autocompletion-the-easy-way/comment-page-2/#comment-144574</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Tue, 26 Jan 2010 15:41:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=202#comment-144574</guid>
		<description>@Laceja: Hm, I still don&#039;t get it. To use autocompletion, you have to use the second snippet from your original comment. The third snippet creates a &quot;normal&quot; input field without autocompletion.

And if you use Firebug, do you see any Ajax requests when you type something into the field with autocompletion?</description>
		<content:encoded><![CDATA[<p>@Laceja: Hm, I still don&#8217;t get it. To use autocompletion, you have to use the second snippet from your original comment. The third snippet creates a &#8220;normal&#8221; input field without autocompletion.</p>
<p>And if you use Firebug, do you see any Ajax requests when you type something into the field with autocompletion?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laceja</title>
		<link>http://cakebaker.42dh.com/2006/06/06/autocompletion-the-easy-way/comment-page-2/#comment-144527</link>
		<dc:creator>Laceja</dc:creator>
		<pubDate>Mon, 25 Jan 2010 18:02:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=202#comment-144527</guid>
		<description>Sorry, I meant to say this is the command I coded to render the field. But, the autocomplete doesn&#039;t work. That is, I don&#039;t get a list as I begin to type and I&#039;m certain there is data in my table to match what I am typing.</description>
		<content:encoded><![CDATA[<p>Sorry, I meant to say this is the command I coded to render the field. But, the autocomplete doesn&#8217;t work. That is, I don&#8217;t get a list as I begin to type and I&#8217;m certain there is data in my table to match what I am typing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2006/06/06/autocompletion-the-easy-way/comment-page-2/#comment-144522</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Mon, 25 Jan 2010 16:09:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=202#comment-144522</guid>
		<description>@Laceja: Hm, I don&#039;t understand what you mean with &quot;the rendered field looks like this&quot;. If it is rendered, it should be HTML code, and not PHP. Also, did you check with Firebug, whether there are any Javascript errors? And which CakePHP version do you use?</description>
		<content:encoded><![CDATA[<p>@Laceja: Hm, I don&#8217;t understand what you mean with &#8220;the rendered field looks like this&#8221;. If it is rendered, it should be HTML code, and not PHP. Also, did you check with Firebug, whether there are any Javascript errors? And which CakePHP version do you use?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laceja</title>
		<link>http://cakebaker.42dh.com/2006/06/06/autocompletion-the-easy-way/comment-page-2/#comment-144365</link>
		<dc:creator>Laceja</dc:creator>
		<pubDate>Fri, 22 Jan 2010 19:13:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=202#comment-144365</guid>
		<description>I can&#039;t seem to make this work. I have in the controller:
&lt;pre&gt;
&lt;code&gt;
var $components = array(&#039;Autocomplete&#039;); 
&lt;/code&gt;
&lt;/pre&gt;
Then in my view I have added:
&lt;pre&gt;
&lt;code&gt;
&lt;?php echo $ajax-&gt;autocomplete(&#039;Operation.op_code&#039;); ?&gt; 
&lt;/code&gt;
&lt;/pre&gt;
And, the rendered field looks like this:
&lt;pre&gt;
&lt;code&gt;
    echo $form-&gt;input(&#039;opcode&#039;, array(&#039;value&#039; =&gt; $furnarray[opcode],&#039;class&#039; =&gt; &#039;short100r3&#039;, &#039;label&#039; =&gt; false, &#039;div&#039; =&gt; false, &#039;action&#039; =&gt; &#039;autocomplete&#039;)); 
&lt;/code&gt;
&lt;/pre&gt;
Of course, I&#039;ve included $components(&#039;Autocomplete&#039;) in the contoller along with adding Ajax to the $helpers, and scriptaculus.js?load=effects and prototype.js are included in the head section.

I&#039;m not getting any errors. It just doesn&#039;t work.

Thanks.</description>
		<content:encoded><![CDATA[<p>I can&#8217;t seem to make this work. I have in the controller:</p>
<pre>
<code>var $components = array('Autocomplete');</code>
</pre>
<p>Then in my view I have added:</p>
<pre>
<code>&lt;?php echo $ajax-&gt;autocomplete('Operation.op_code'); ?&gt;</code>
</pre>
<p>And, the rendered field looks like this:</p>
<pre>
<code>echo $form-&gt;input('opcode', array('value' =&gt; $furnarray[opcode],'class' =&gt; 'short100r3', 'label' =&gt; false, 'div' =&gt; false, 'action' =&gt; 'autocomplete'));</code>
</pre>
<p>Of course, I&#8217;ve included $components(&#8216;Autocomplete&#8217;) in the contoller along with adding Ajax to the $helpers, and scriptaculus.js?load=effects and prototype.js are included in the head section.</p>
<p>I&#8217;m not getting any errors. It just doesn&#8217;t work.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
