<?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"
	>
<channel>
	<title>Comments on: AJAX Auto Complete</title>
	<atom:link href="http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/</link>
	<description>Two Guys, One Framework</description>
	<pubDate>Wed, 10 Mar 2010 02:11:33 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: jpromerobx</title>
		<link>http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/#comment-254</link>
		<dc:creator>jpromerobx</dc:creator>
		<pubDate>Mon, 01 Dec 2008 08:04:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.symfony-blog.co.uk/?p=5#comment-254</guid>
		<description>Thanks Rob for this usefull example. It solve some problems with the input_auto_complete_tag for my project.</description>
		<content:encoded><![CDATA[<p>Thanks Rob for this usefull example. It solve some problems with the input_auto_complete_tag for my project.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vadim</title>
		<link>http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/#comment-253</link>
		<dc:creator>Vadim</dc:creator>
		<pubDate>Wed, 26 Nov 2008 21:02:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.symfony-blog.co.uk/?p=5#comment-253</guid>
		<description>By the way, Rob - what about an autocompletion in symfony 1.1? The same using of input_auto_complete_tag? Is this symfony's new form model style - what do you think?</description>
		<content:encoded><![CDATA[<p>By the way, Rob - what about an autocompletion in symfony 1.1? The same using of input_auto_complete_tag? Is this symfony&#8217;s new form model style - what do you think?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vadim</title>
		<link>http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/#comment-252</link>
		<dc:creator>Vadim</dc:creator>
		<pubDate>Wed, 26 Nov 2008 16:53:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.symfony-blog.co.uk/?p=5#comment-252</guid>
		<description>Thanks Rob, it was the most useful example I could find.</description>
		<content:encoded><![CDATA[<p>Thanks Rob, it was the most useful example I could find.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/#comment-250</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Thu, 11 Sep 2008 03:31:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.symfony-blog.co.uk/?p=5#comment-250</guid>
		<description>Rob,
my code fragment didn't past in correctly above. All the html was translated instead of it actually showing all the tags. 
I was able to past in my code into the symfony forums, but nobody seems to want to touch this one.
Here is the URL.
http://www.symfony-project.org/forum/index.php/t/15466/

Any help would be tremendously appreciated.
thanks.
-p</description>
		<content:encoded><![CDATA[<p>Rob,<br />
my code fragment didn&#8217;t past in correctly above. All the html was translated instead of it actually showing all the tags.<br />
I was able to past in my code into the symfony forums, but nobody seems to want to touch this one.<br />
Here is the URL.<br />
<a href="http://www.symfony-project.org/forum/index.php/t/15466/" rel="nofollow">http://www.symfony-project.org/forum/index.php/t/15466/</a></p>
<p>Any help would be tremendously appreciated.<br />
thanks.<br />
-p</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/#comment-249</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Thu, 11 Sep 2008 03:27:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.symfony-blog.co.uk/?p=5#comment-249</guid>
		<description>Rob,
thanks for getting backed to me, its going on 2 weeks now and I can't seem to 
figure this one out.  I think when I past my code fragments in here, sometimes they get messed up. This time I tried it and while I had my 4 choices in the list, I checked Firebug to see what the actual code looked like. Based on that it looks like my  tags are okay.

This is what firebug shows me when I inspect the html.



Product_ID:


Name: Enter a product name:



Blue Red Bear
Blond Pink Doll
Batman Bear
Ball Bear



//













If you would like, I would be happy to send you my code .. its pretty small and easy to read.

-p</description>
		<content:encoded><![CDATA[<p>Rob,<br />
thanks for getting backed to me, its going on 2 weeks now and I can&#8217;t seem to<br />
figure this one out.  I think when I past my code fragments in here, sometimes they get messed up. This time I tried it and while I had my 4 choices in the list, I checked Firebug to see what the actual code looked like. Based on that it looks like my  tags are okay.</p>
<p>This is what firebug shows me when I inspect the html.</p>
<p>Product_ID:</p>
<p>Name: Enter a product name:</p>
<p>Blue Red Bear<br />
Blond Pink Doll<br />
Batman Bear<br />
Ball Bear</p>
<p>//</p>
<p>If you would like, I would be happy to send you my code .. its pretty small and easy to read.</p>
<p>-p</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/#comment-248</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Wed, 10 Sep 2008 19:50:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.symfony-blog.co.uk/?p=5#comment-248</guid>
		<description>Peter... It looks like your partial _products.php is only printing stuff like this

&lt;pre lang="PHP"&gt;
&lt;li id="1"&gt;Name
&lt;/pre&gt;

Which would mean your list is bad HTML, which might cause the problem. You need your list to be well formed like so:

&lt;pre lang="PHP"&gt;
&lt;ul&gt;
  &lt;li id="1"&gt;Name 1&lt;/li&gt;
  &lt;li id="2"&gt;Name 2&lt;/li&gt;
  &lt;li id="3"&gt;Name 3&lt;/li&gt;
  &lt;li id="4"&gt;Name 4&lt;/li&gt;
&lt;/ul&gt;
&lt;/pre&gt;

Please let me know if this was the problem?</description>
		<content:encoded><![CDATA[<p>Peter&#8230; It looks like your partial _products.php is only printing stuff like this</p>

<div class="wp_syntax"><div class="code"><pre class="php">&lt;li id=<span style="color: #ff0000;">&quot;1&quot;</span>&gt;Name</pre></div></div>

<p>Which would mean your list is bad HTML, which might cause the problem. You need your list to be well formed like so:</p>

<div class="wp_syntax"><div class="code"><pre class="php">&lt;ul&gt;
  &lt;li id=<span style="color: #ff0000;">&quot;1&quot;</span>&gt;Name <span style="color: #cc66cc;">1</span>&lt;/li&gt;
  &lt;li id=<span style="color: #ff0000;">&quot;2&quot;</span>&gt;Name <span style="color: #cc66cc;">2</span>&lt;/li&gt;
  &lt;li id=<span style="color: #ff0000;">&quot;3&quot;</span>&gt;Name <span style="color: #cc66cc;">3</span>&lt;/li&gt;
  &lt;li id=<span style="color: #ff0000;">&quot;4&quot;</span>&gt;Name <span style="color: #cc66cc;">4</span>&lt;/li&gt;
&lt;/ul&gt;</pre></div></div>

<p>Please let me know if this was the problem?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/#comment-247</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Wed, 10 Sep 2008 19:38:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.symfony-blog.co.uk/?p=5#comment-247</guid>
		<description>Rajesh... Are you definitely including the helper? For example:

&lt;pre lang="PHP"&gt;&lt;?php use_helper('Javascript'); ?&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Rajesh&#8230; Are you definitely including the helper? For example:</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span> use_helper<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Javascript'</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: Rajesh</title>
		<link>http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/#comment-246</link>
		<dc:creator>Rajesh</dc:creator>
		<pubDate>Thu, 04 Sep 2008 07:16:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.symfony-blog.co.uk/?p=5#comment-246</guid>
		<description>I'm using the same code but i'cant call the input_auto_complete_tag...
please reply why  i can't call.

thanks</description>
		<content:encoded><![CDATA[<p>I&#8217;m using the same code but i&#8217;cant call the input_auto_complete_tag&#8230;<br />
please reply why  i can&#8217;t call.</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/#comment-245</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Thu, 04 Sep 2008 02:18:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.symfony-blog.co.uk/?p=5#comment-245</guid>
		<description>BTW, the _products.php didn't past in correctly. It looks just like your example except that I use the getIdIO and getName() functions to build my LI tag.
-p</description>
		<content:encoded><![CDATA[<p>BTW, the _products.php didn&#8217;t past in correctly. It looks just like your example except that I use the getIdIO and getName() functions to build my LI tag.<br />
-p</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/#comment-244</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Thu, 04 Sep 2008 02:14:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.symfony-blog.co.uk/?p=5#comment-244</guid>
		<description>Guys,
 I'm using Firefox 2.0.0.14 and I am new to Symfony. (using 1.0).
 I setup your example and I get the autocomple to work fine in the sense that
 the data is pulled from the database into an  tag. When I click the "down" arrow to navigate my list, everything works fine... each item is highlighted, but when I click the "up" arrow to go back up the list, everything goes screwy. The listed items start to appear and disappear everytime I click the "up" arrow on my keyboard. I'm thinking this has something to do with main.css and/or view.yml. Can you tell me if you have any special css to get this to work, and/or what view.yml needs to be set for the action that does the autocomplete.

I'll paste my code pieces here...

my template: createSuccess.php

Name:
&lt;pre lang="PHP"&gt;
 'off'),
      array(
        'use_style'             =&gt; true,
        'after_update_element'  =&gt; "function (inputField, selectedItem) { $('select_a_id').value = selectedItem.id; }"
      )
    );
?&gt;
&lt;/pre&gt;

my products autocomplete action in actions.class.php

&lt;pre lang="PHP"&gt;
  public function executeAutoComplete()
  {
    // Get which input called the function
    $input = $this-&gt;getRequestParameter('select');
    // Get what the user has typed
    $typed = $this-&gt;getRequestParameter('select_'.$input);

    $this-&gt;productss = ProductsPeer::retrieveByLike($typed);
    $partial = get_partial('products',array('products' =&gt; $this-&gt;productss ));
    return $this-&gt;renderText($partial);

  }
&lt;/pre&gt;
--- my partial _products.php

&lt;pre lang="PHP"&gt;
&lt;li id="&lt;?php echo getId() ?&gt;"&gt;&lt;?php echo getName() ?&gt;
&lt;/pre&gt;

Like I said, I get the data fine from the database, but the display and the navigation of the list is screwy. I also need the extra "" in my template because without them, I don't see the full list of items returned by  my query...so it has something to do with the layout.
I can provide screen prints if it makes it easier to follow.
Any help would be greatly appreciated.

-p</description>
		<content:encoded><![CDATA[<p>Guys,<br />
 I&#8217;m using Firefox 2.0.0.14 and I am new to Symfony. (using 1.0).<br />
 I setup your example and I get the autocomple to work fine in the sense that<br />
 the data is pulled from the database into an  tag. When I click the &#8220;down&#8221; arrow to navigate my list, everything works fine&#8230; each item is highlighted, but when I click the &#8220;up&#8221; arrow to go back up the list, everything goes screwy. The listed items start to appear and disappear everytime I click the &#8220;up&#8221; arrow on my keyboard. I&#8217;m thinking this has something to do with main.css and/or view.yml. Can you tell me if you have any special css to get this to work, and/or what view.yml needs to be set for the action that does the autocomplete.</p>
<p>I&#8217;ll paste my code pieces here&#8230;</p>
<p>my template: createSuccess.php</p>
<p>Name:</p>

<div class="wp_syntax"><div class="code"><pre class="php"> <span style="color: #ff0000;">'off'</span><span style="color: #66cc66;">&#41;</span>,
      <span style="color: #000066;">array</span><span style="color: #66cc66;">&#40;</span>
        <span style="color: #ff0000;">'use_style'</span>             =&gt; <span style="color: #000000; font-weight: bold;">true</span>,
        <span style="color: #ff0000;">'after_update_element'</span>  =&gt; <span style="color: #ff0000;">&quot;function (inputField, selectedItem) { $('select_a_id').value = selectedItem.id; }&quot;</span>
      <span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>my products autocomplete action in actions.class.php</p>

<div class="wp_syntax"><div class="code"><pre class="php">  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> executeAutoComplete<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#123;</span>
    <span style="color: #808080; font-style: italic;">// Get which input called the function</span>
    <span style="color: #0000ff;">$input</span> = <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">getRequestParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'select'</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #808080; font-style: italic;">// Get what the user has typed</span>
    <span style="color: #0000ff;">$typed</span> = <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">getRequestParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'select_'</span>.<span style="color: #0000ff;">$input</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
    <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">productss</span> = ProductsPeer::<span style="color: #006600;">retrieveByLike</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$typed</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #0000ff;">$partial</span> = get_partial<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'products'</span>,<span style="color: #000066;">array</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'products'</span> =&gt; <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">productss</span> <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$this</span>-&gt;<span style="color: #006600;">renderText</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$partial</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
  <span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>&#8212; my partial _products.php</p>

<div class="wp_syntax"><div class="code"><pre class="php">&lt;li id=<span style="color: #ff0000;">&quot;&lt;?php echo getId() ?&gt;&quot;</span>&gt;&lt;?php <span style="color: #000066;">echo</span> getName<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Like I said, I get the data fine from the database, but the display and the navigation of the list is screwy. I also need the extra &#8220;&#8221; in my template because without them, I don&#8217;t see the full list of items returned by  my query&#8230;so it has something to do with the layout.<br />
I can provide screen prints if it makes it easier to follow.<br />
Any help would be greatly appreciated.</p>
<p>-p</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/#comment-243</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Sat, 30 Aug 2008 09:11:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.symfony-blog.co.uk/?p=5#comment-243</guid>
		<description>Hi Andrzej,

I think you need to make a slight change to your options array like the following:

array(’use_style’ =&gt; true, ‘with’ =&gt; " value+'&#38;radio='+$('radio').checked")

Take note of the value+ before your radio value bit. Please let me know how you get on with this.

Thanks,

Rob
Symfony-Blog.co.uk</description>
		<content:encoded><![CDATA[<p>Hi Andrzej,</p>
<p>I think you need to make a slight change to your options array like the following:</p>
<p>array(’use_style’ => true, ‘with’ => &#8221; value+&#8217;&amp;radio=&#8217;+$(&#8217;radio&#8217;).checked&#8221;)</p>
<p>Take note of the value+ before your radio value bit. Please let me know how you get on with this.</p>
<p>Thanks,</p>
<p>Rob<br />
Symfony-Blog.co.uk</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrzej</title>
		<link>http://www.symfony-blog.co.uk/2008/04/ajax-auto-complete/#comment-242</link>
		<dc:creator>Andrzej</dc:creator>
		<pubDate>Fri, 29 Aug 2008 15:56:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.symfony-blog.co.uk/?p=5#comment-242</guid>
		<description>sorry, don't know how to past the code in here...</description>
		<content:encoded><![CDATA[<p>sorry, don&#8217;t know how to past the code in here&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
