<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.1.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Auto-Complete Field with jQuery - Code Explained</title>
	<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/</link>
	<description>Throwing code to the wind</description>
	<pubDate>Sat, 13 Mar 2010 00:14:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.3</generator>

	<item>
		<title>By: TaMeR</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-6</link>
		<author>TaMeR</author>
		<pubDate>Fri, 11 May 2007 05:46:28 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-6</guid>
					<description>First I like to thank you for the script.

I am trying to get this to work with codeigniter http://codeigniter.com
But I can't figure out how because you are using $_GET 
How hart would it be to change this to use $_POST?
Even better to use the input field name in place of 'part'</description>
		<content:encoded><![CDATA[<p>First I like to thank you for the script.</p>
<p>I am trying to get this to work with codeigniter <a href="http://codeigniter.com" rel="nofollow">http://codeigniter.com</a><br />
But I can&#8217;t figure out how because you are using $_GET<br />
How hart would it be to change this to use $_POST?<br />
Even better to use the input field name in place of &#8216;part&#8217;</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: fromvega</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-7</link>
		<author>fromvega</author>
		<pubDate>Fri, 11 May 2007 13:35:25 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-7</guid>
					<description>Hello TaMer. To use the input field name in place of 'part' is easy. You just need to change the URL when calling setAutoComplete as the following:

&lt;pre lang="javascript"&gt;
setAutoComplete("searchField", "results", "autocomplete.php?searchField=");
&lt;/pre&gt;

Now, to use POST method instead of GET you will need to change some code. Here is what you need to do: 

Change the line 84 of autocomplete.js where you read &lt;code&gt;&lt;strong&gt;$.getJSON(acURL + part, function(json){&lt;/strong&gt;&lt;/code&gt; to this:

&lt;pre lang="javascript" line="84"&gt;
	$.ajax({
		type: "POST",
		url: acURL,
		data: acSearchField.attr("name") + "=" + part,
		dataType: "json",
		success: function(json){
&lt;/pre&gt;

And then change the old line 121 where you read &lt;code&gt;&lt;strong&gt;});&lt;/strong&gt;&lt;/code&gt; to &lt;code&gt;&lt;strong&gt;}});&lt;/strong&gt;&lt;/code&gt;

This little change should be enough to send a POST using the name of the input field as parameter. But please be aware that GET is the standard for requesting data.

If you all like the idea I can write a post exemplifying some methods of the jQuery Ajax library.</description>
		<content:encoded><![CDATA[<p>Hello TaMer. To use the input field name in place of &#8216;part&#8217; is easy. You just need to change the URL when calling setAutoComplete as the following:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript">setAutoComplete<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;searchField&quot;</span>, <span style="color: #3366CC;">&quot;results&quot;</span>, <span style="color: #3366CC;">&quot;autocomplete.php?searchField=&quot;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>Now, to use POST method instead of GET you will need to change some code. Here is what you need to do: </p>
<p>Change the line 84 of autocomplete.js where you read <code><strong>$.getJSON(acURL + part, function(json){</strong></code> to this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>84
85
86
87
88
89
</pre></td><td class="code"><pre class="javascript">	$.<span style="color: #006600;">ajax</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span>
		type: <span style="color: #3366CC;">&quot;POST&quot;</span>,
		url: acURL,
		data: acSearchField.<span style="color: #006600;">attr</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;name&quot;</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #3366CC;">&quot;=&quot;</span> + part,
		dataType: <span style="color: #3366CC;">&quot;json&quot;</span>,
		success: <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>json<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></pre></td></tr></table></div>

<p>And then change the old line 121 where you read <code><strong>});</strong></code> to <code><strong>}});</strong></code></p>
<p>This little change should be enough to send a POST using the name of the input field as parameter. But please be aware that GET is the standard for requesting data.</p>
<p>If you all like the idea I can write a post exemplifying some methods of the jQuery Ajax library.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Rene A.</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-25</link>
		<author>Rene A.</author>
		<pubDate>Wed, 16 May 2007 11:23:19 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-25</guid>
					<description>Very nice script  and demo.

Is there any change you could help me, to make this working with more then one input-field per page?</description>
		<content:encoded><![CDATA[<p>Very nice script  and demo.</p>
<p>Is there any change you could help me, to make this working with more then one input-field per page?</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: fromvega</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-26</link>
		<author>fromvega</author>
		<pubDate>Wed, 16 May 2007 14:24:35 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-26</guid>
					<description>Hello! I would be glad to help you. As I said I'm planning a new release where there will be no limit to the number of input fields. But I'm just a little busy with another project these days.

If you can wait I'll try to post the new release by the end of this week. If not, you can duplicate the code and rename the global variables and functions for each field. 

Thank you for the audience.</description>
		<content:encoded><![CDATA[<p>Hello! I would be glad to help you. As I said I&#8217;m planning a new release where there will be no limit to the number of input fields. But I&#8217;m just a little busy with another project these days.</p>
<p>If you can wait I&#8217;ll try to post the new release by the end of this week. If not, you can duplicate the code and rename the global variables and functions for each field. </p>
<p>Thank you for the audience.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: cg</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-29</link>
		<author>cg</author>
		<pubDate>Wed, 16 May 2007 21:55:00 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-29</guid>
					<description>so, how about doing a lookup against a database? 
for example, what if the user did a search for a name like "a" and you wanted your db to return a list like: 

select id, name from table where name like 'a%' 

so if they see a list like:
albert
allison
etc, whatever names starting in "a" in your table

they could click one of the names and hit submit and go along their way</description>
		<content:encoded><![CDATA[<p>so, how about doing a lookup against a database?<br />
for example, what if the user did a search for a name like &#8220;a&#8221; and you wanted your db to return a list like: </p>
<p>select id, name from table where name like &#8216;a%&#8217; </p>
<p>so if they see a list like:<br />
albert<br />
allison<br />
etc, whatever names starting in &#8220;a&#8221; in your table</p>
<p>they could click one of the names and hit submit and go along their way</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: fromvega</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-30</link>
		<author>fromvega</author>
		<pubDate>Wed, 16 May 2007 23:03:17 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-30</guid>
					<description>It's pretty straightforward. Assuming you didn't change the example URL and that you are using PHP you will have the "a" letter available in $_GET['part'] to use it to build the SQL statement and perform the database query.

After you would need to loop through the results adding each returned word to an array, like &lt;code&gt;$names[] = $row['name']&lt;/code&gt;. And at last you would need to echo the JSON representation of your array. This way the input field would be populated with your database results. 

Now, to submit the chosen value you just need to put the input field inside a form tag and to create a submit button for it.

Let me know if you need further help!</description>
		<content:encoded><![CDATA[<p>It&#8217;s pretty straightforward. Assuming you didn&#8217;t change the example URL and that you are using PHP you will have the &#8220;a&#8221; letter available in $_GET[&#8217;part&#8217;] to use it to build the SQL statement and perform the database query.</p>
<p>After you would need to loop through the results adding each returned word to an array, like <code>$names[] = $row['name']</code>. And at last you would need to echo the JSON representation of your array. This way the input field would be populated with your database results. </p>
<p>Now, to submit the chosen value you just need to put the input field inside a form tag and to create a submit button for it.</p>
<p>Let me know if you need further help!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Suissa</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-42</link>
		<author>Suissa</author>
		<pubDate>Sun, 20 May 2007 22:08:39 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-42</guid>
					<description>Greate plugin dude!

congratz form Brazil</description>
		<content:encoded><![CDATA[<p>Greate plugin dude!</p>
<p>congratz form Brazil</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Samalah</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-46</link>
		<author>Samalah</author>
		<pubDate>Tue, 22 May 2007 07:17:47 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-46</guid>
					<description>This looks to be a really great update/change to the jquery autocomplete plugin. I tried using the plugin directly from bassistance.de but had no luck in querying the database as I'm a complete php / sql newbie. If it wasn't too much effort could you please post a quick sample of what the php and sql would look like for grabbing a value from the database?

Thanks for taking the time to create the script and write about it, it's much appreciated!</description>
		<content:encoded><![CDATA[<p>This looks to be a really great update/change to the jquery autocomplete plugin. I tried using the plugin directly from bassistance.de but had no luck in querying the database as I&#8217;m a complete php / sql newbie. If it wasn&#8217;t too much effort could you please post a quick sample of what the php and sql would look like for grabbing a value from the database?</p>
<p>Thanks for taking the time to create the script and write about it, it&#8217;s much appreciated!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: fromvega</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-48</link>
		<author>fromvega</author>
		<pubDate>Tue, 22 May 2007 15:08:57 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-48</guid>
					<description>Hello Samalah, there are many ways of querying a database. Assuming that you are using MySQL you could use the mysqli extension (http://php.net/mysqli) or the PDO extension  (http://php.net/pdo).

The PDO extension "provides a data-access abstraction layer, which means that, regardless of which database you're using, you use the same functions to issue queries and fetch data".

At http://php.net you can find almost everything you need, including examples. I'm thinking about making another post with complete information about using the script with a database. But here I'll give you just a snapshot of what you could use, then you should read the manual.

First you need to connect to the database. Then you need to execute a query statement built with the value supplied by the user. Let's say for example that the input field would require a person's last name. After you get the "part" typed by the user you need to make a database query to retrieve all last names that have "part". The sql statement would need to be similar to the following:

&lt;pre lang="sql"&gt;
SELECT last_name FROM names WHERE last_name LIKE '%part%'
&lt;/pre&gt;

Where "part" needs to be replaced by the value in $_GET['part'] if you are using the original script. The "%" is a character that matches any number of characters.

After executing this query you need to loop through the results adding each result to an array that will be returned as JSON.

Sorry not to be more specific at this time but I promisse that I'll make another post soon about working with the database.

Thank you.</description>
		<content:encoded><![CDATA[<p>Hello Samalah, there are many ways of querying a database. Assuming that you are using MySQL you could use the mysqli extension (http://php.net/mysqli) or the PDO extension  (http://php.net/pdo).</p>
<p>The PDO extension &#8220;provides a data-access abstraction layer, which means that, regardless of which database you&#8217;re using, you use the same functions to issue queries and fetch data&#8221;.</p>
<p>At <a href="http://php.net" rel="nofollow">http://php.net</a> you can find almost everything you need, including examples. I&#8217;m thinking about making another post with complete information about using the script with a database. But here I&#8217;ll give you just a snapshot of what you could use, then you should read the manual.</p>
<p>First you need to connect to the database. Then you need to execute a query statement built with the value supplied by the user. Let&#8217;s say for example that the input field would require a person&#8217;s last name. After you get the &#8220;part&#8221; typed by the user you need to make a database query to retrieve all last names that have &#8220;part&#8221;. The sql statement would need to be similar to the following:</p>

<div class="wp_syntax"><div class="code"><pre class="sql"><span style="color: #993333; font-weight: bold;">SELECT</span> last_name <span style="color: #993333; font-weight: bold;">FROM</span> names <span style="color: #993333; font-weight: bold;">WHERE</span> last_name <span style="color: #993333; font-weight: bold;">LIKE</span> <span style="color: #ff0000;">'%part%'</span></pre></div></div>

<p>Where &#8220;part&#8221; needs to be replaced by the value in $_GET[&#8217;part&#8217;] if you are using the original script. The &#8220;%&#8221; is a character that matches any number of characters.</p>
<p>After executing this query you need to loop through the results adding each result to an array that will be returned as JSON.</p>
<p>Sorry not to be more specific at this time but I promisse that I&#8217;ll make another post soon about working with the database.</p>
<p>Thank you.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Samalah</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-96</link>
		<author>Samalah</author>
		<pubDate>Sun, 03 Jun 2007 00:37:19 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-96</guid>
					<description>Thanks for taking the time to reply, I really appreciate it! I'll look forward to reading your further articles....

Samalah</description>
		<content:encoded><![CDATA[<p>Thanks for taking the time to reply, I really appreciate it! I&#8217;ll look forward to reading your further articles&#8230;.</p>
<p>Samalah</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: nuxx</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-363</link>
		<author>nuxx</author>
		<pubDate>Thu, 12 Jul 2007 12:00:06 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-363</guid>
					<description>Excellent tutorial, currently tweaking the script to my needs... may I suggest the addition of autocomplete="off" to the input field, in order to prevent the browser from overriding your script with its own autocomplete feature, as firefox for instance seems to do when you type a word, after the form earlier has been submitted with a value beginning with the initial letter of the word in question.</description>
		<content:encoded><![CDATA[<p>Excellent tutorial, currently tweaking the script to my needs&#8230; may I suggest the addition of autocomplete=&#8221;off&#8221; to the input field, in order to prevent the browser from overriding your script with its own autocomplete feature, as firefox for instance seems to do when you type a word, after the form earlier has been submitted with a value beginning with the initial letter of the word in question.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: fromvega</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-364</link>
		<author>fromvega</author>
		<pubDate>Thu, 12 Jul 2007 13:58:49 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-364</guid>
					<description>Hello nuxx, thanks for the suggestion! I'll address this issue in the next release. I think you would like to know that I already have implemented a jQuery plug-in for this script, allowing it to be applied to an unlimited number of fields.

It's just that I would like to make a really good post, showing how to implement it to retrieve data from a database for instance. But now I'm busy with other projects. I just need to tune the plug-in a little bit before releasing it.

Keep tuned!</description>
		<content:encoded><![CDATA[<p>Hello nuxx, thanks for the suggestion! I&#8217;ll address this issue in the next release. I think you would like to know that I already have implemented a jQuery plug-in for this script, allowing it to be applied to an unlimited number of fields.</p>
<p>It&#8217;s just that I would like to make a really good post, showing how to implement it to retrieve data from a database for instance. But now I&#8217;m busy with other projects. I just need to tune the plug-in a little bit before releasing it.</p>
<p>Keep tuned!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Gary</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-794</link>
		<author>Gary</author>
		<pubDate>Fri, 14 Dec 2007 17:33:19 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-794</guid>
					<description>Hi, first of all, this is an awesome playground, very cool and neat ideas were implemented, hat's off.

I have a question: I'm a PHP developer and client-side scripting is not my strength at all. Is that possible without massive modifications to send more than one variable to the server-side script? It would be a neat feature if it's possible, the first thing popped in my mind is a blog where you can search for a thing in a given time quantum.

Any input would be appreciated.</description>
		<content:encoded><![CDATA[<p>Hi, first of all, this is an awesome playground, very cool and neat ideas were implemented, hat&#8217;s off.</p>
<p>I have a question: I&#8217;m a PHP developer and client-side scripting is not my strength at all. Is that possible without massive modifications to send more than one variable to the server-side script? It would be a neat feature if it&#8217;s possible, the first thing popped in my mind is a blog where you can search for a thing in a given time quantum.</p>
<p>Any input would be appreciated.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: fromvega</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-803</link>
		<author>fromvega</author>
		<pubDate>Sun, 30 Dec 2007 21:09:57 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-803</guid>
					<description>Hello Gary, sorry for the delay! To send another variable the easiest way is to write it as a GET parameter directly in the remote script URL.

Where it reads autocomplete.php?part= you can write something like the following to send a variable called "newvar":

setAutoComplete("searchField", "results", "autocomplete.php?newvar=value&#038;part=");

Remember that part= needs to be in the end. Any other type of customization would imply writing javascript code.

Bye!</description>
		<content:encoded><![CDATA[<p>Hello Gary, sorry for the delay! To send another variable the easiest way is to write it as a GET parameter directly in the remote script URL.</p>
<p>Where it reads autocomplete.php?part= you can write something like the following to send a variable called &#8220;newvar&#8221;:</p>
<p>setAutoComplete(&#8221;searchField&#8221;, &#8220;results&#8221;, &#8220;autocomplete.php?newvar=value&#038;part=&#8221;);</p>
<p>Remember that part= needs to be in the end. Any other type of customization would imply writing javascript code.</p>
<p>Bye!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Gary</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-804</link>
		<author>Gary</author>
		<pubDate>Sun, 30 Dec 2007 21:27:45 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-804</guid>
					<description>Hello,

No problem for the delay, i resolved the problem exactly like you mentioned it, ironically just after an hour I posted the message here: with server-side injected custom variable harvested from sessions and post data.

Thanks anyway for the answer,
And a very big thank you for the script.

Gary</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>No problem for the delay, i resolved the problem exactly like you mentioned it, ironically just after an hour I posted the message here: with server-side injected custom variable harvested from sessions and post data.</p>
<p>Thanks anyway for the answer,<br />
And a very big thank you for the script.</p>
<p>Gary</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: tester</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-829</link>
		<author>tester</author>
		<pubDate>Wed, 05 Mar 2008 03:01:34 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-829</guid>
					<description>Hi, 
Thanks for the great script. I love it a lot! One small problem that I am experiencing is the editable element's width and height don't look very well, I tried to adjust the sf_height and sf_width by *2 (e.g:acSearchField.height()*2), however, it doesn't seem to be working. I also tried to override the width and height in css by declaring !important. No luck as well. Any idea how I can enlarge the editable field width and height?

Thanks!</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Thanks for the great script. I love it a lot! One small problem that I am experiencing is the editable element&#8217;s width and height don&#8217;t look very well, I tried to adjust the sf_height and sf_width by *2 (e.g:acSearchField.height()*2), however, it doesn&#8217;t seem to be working. I also tried to override the width and height in css by declaring !important. No luck as well. Any idea how I can enlarge the editable field width and height?</p>
<p>Thanks!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: riyas</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-836</link>
		<author>riyas</author>
		<pubDate>Mon, 17 Mar 2008 10:16:18 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-836</guid>
					<description>Hi,
I need to implement the same autocomplete feature in java . My back end is Ms access. If possible can u Send the source code to my mail id 

I am an enginnering graduate and i need to implement this feature in my project. Plaese help me out</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I need to implement the same autocomplete feature in java . My back end is Ms access. If possible can u Send the source code to my mail id </p>
<p>I am an enginnering graduate and i need to implement this feature in my project. Plaese help me out</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: fromvega</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-837</link>
		<author>fromvega</author>
		<pubDate>Mon, 17 Mar 2008 15:28:08 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-837</guid>
					<description>Hello riyas, if you read this post more carefully you will notice that there is a link for the source code. But, anyway, here is the link: http://fromvega.com/code/autocomplete/autocomplete.zip</description>
		<content:encoded><![CDATA[<p>Hello riyas, if you read this post more carefully you will notice that there is a link for the source code. But, anyway, here is the link: <a href="http://fromvega.com/code/autocomplete/autocomplete.zip" rel="nofollow">http://fromvega.com/code/autocomplete/autocomplete.zip</a></p>
]]></content:encoded>
				</item>
	<item>
		<title>By: yasser</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-868</link>
		<author>yasser</author>
		<pubDate>Mon, 05 May 2008 23:15:55 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-868</guid>
					<description>hi, in your code i change 
$colors = array('hola', 'blue', 'brown', 'green', 'grey',
		'gold', 'navy', 'orange', 'pink', 'silver',
		'violet', 'yellow', 'red','Baja California');

by:

$result = mysql_query("select colores from color ORDER BY colores ASC",$link);
while($row = mysql_fetch_array($result)){
			$colors[] = $row['colores'];
	}

and doesnt appear anything in the input to autocomplete.
what im missing??</description>
		<content:encoded><![CDATA[<p>hi, in your code i change<br />
$colors = array(&#8217;hola&#8217;, &#8216;blue&#8217;, &#8216;brown&#8217;, &#8216;green&#8217;, &#8216;grey&#8217;,<br />
		&#8216;gold&#8217;, &#8216;navy&#8217;, &#8216;orange&#8217;, &#8216;pink&#8217;, &#8217;silver&#8217;,<br />
		&#8216;violet&#8217;, &#8216;yellow&#8217;, &#8216;red&#8217;,'Baja California&#8217;);</p>
<p>by:</p>
<p>$result = mysql_query(&#8221;select colores from color ORDER BY colores ASC&#8221;,$link);<br />
while($row = mysql_fetch_array($result)){<br />
			$colors[] = $row[&#8217;colores&#8217;];<br />
	}</p>
<p>and doesnt appear anything in the input to autocomplete.<br />
what im missing??</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Matt</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-872</link>
		<author>Matt</author>
		<pubDate>Fri, 16 May 2008 10:08:31 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-872</guid>
					<description>Hi
Great script - possibly the best one I've seen

I am waiting patiently for the the update to use multiple fields

any idea when you'll have a chance to look at it?

 Thanks

 Matt</description>
		<content:encoded><![CDATA[<p>Hi<br />
Great script - possibly the best one I&#8217;ve seen</p>
<p>I am waiting patiently for the the update to use multiple fields</p>
<p>any idea when you&#8217;ll have a chance to look at it?</p>
<p> Thanks</p>
<p> Matt</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: fromvega</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-873</link>
		<author>fromvega</author>
		<pubDate>Fri, 16 May 2008 18:22:24 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-873</guid>
					<description>Hello yasser, maybe there is something wrong in your PHP code and the returned data is an error string or maybe a warning. For it to work, the output needs to be a plain json string.</description>
		<content:encoded><![CDATA[<p>Hello yasser, maybe there is something wrong in your PHP code and the returned data is an error string or maybe a warning. For it to work, the output needs to be a plain json string.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: fromvega</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-874</link>
		<author>fromvega</author>
		<pubDate>Fri, 16 May 2008 18:25:05 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-874</guid>
					<description>Thanks Matt, I created the multiple fields plugin already. But it's lost somewhere in my hard drive. I have been busy with other projects. And I usually just get back to the site when there are comments! ;) But I'm going to try to find it and post it here as soon as possible!</description>
		<content:encoded><![CDATA[<p>Thanks Matt, I created the multiple fields plugin already. But it&#8217;s lost somewhere in my hard drive. I have been busy with other projects. And I usually just get back to the site when there are comments! <img src='http://fromvega.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> But I&#8217;m going to try to find it and post it here as soon as possible!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Tyler Rick</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-881</link>
		<author>Tyler Rick</author>
		<pubDate>Wed, 28 May 2008 07:43:34 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-881</guid>
					<description>Thanks for the great work, fromvega. I'm glad you finally made a multiple-fields-capable plugin. That's just what I need right now. Hopefully you will post it soon... In the meantime, looks like I'll have to use

http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/</description>
		<content:encoded><![CDATA[<p>Thanks for the great work, fromvega. I&#8217;m glad you finally made a multiple-fields-capable plugin. That&#8217;s just what I need right now. Hopefully you will post it soon&#8230; In the meantime, looks like I&#8217;ll have to use</p>
<p><a href="http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/" rel="nofollow">http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/</a></p>
]]></content:encoded>
				</item>
	<item>
		<title>By: WoL</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-893</link>
		<author>WoL</author>
		<pubDate>Fri, 27 Jun 2008 00:56:03 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-893</guid>
					<description>Yes multiple fields is all we need and this script will be king :D</description>
		<content:encoded><![CDATA[<p>Yes multiple fields is all we need and this script will be king <img src='http://fromvega.com/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /></p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Macpaul</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-899</link>
		<author>Macpaul</author>
		<pubDate>Fri, 04 Jul 2008 13:24:23 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-899</guid>
					<description>As a possible stop gap, I found a solution for multiple fields. As it stands if you have multiple  setAutoComplete blocks on a page, the last one is the only one that applies to all your fields.

I took the route of placing this code inside the 'onfocus=' event for each input. Seems to work quite well so far, with limited testing... :)</description>
		<content:encoded><![CDATA[<p>As a possible stop gap, I found a solution for multiple fields. As it stands if you have multiple  setAutoComplete blocks on a page, the last one is the only one that applies to all your fields.</p>
<p>I took the route of placing this code inside the &#8216;onfocus=&#8217; event for each input. Seems to work quite well so far, with limited testing&#8230; <img src='http://fromvega.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
				</item>
	<item>
		<title>By: thompsonson</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-954</link>
		<author>thompsonson</author>
		<pubDate>Mon, 22 Sep 2008 19:45:30 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-954</guid>
					<description>Hey fromvega,

Great script, nice and easy to understand, would like to get my hands on the multiple version if possible? even if it's just the code without a post, that'd be brilliant.

Please post it! :)

Thanks for the good work dude,
Matt</description>
		<content:encoded><![CDATA[<p>Hey fromvega,</p>
<p>Great script, nice and easy to understand, would like to get my hands on the multiple version if possible? even if it&#8217;s just the code without a post, that&#8217;d be brilliant.</p>
<p>Please post it! <img src='http://fromvega.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks for the good work dude,<br />
Matt</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: fromvega</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-961</link>
		<author>fromvega</author>
		<pubDate>Mon, 29 Sep 2008 12:37:48 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-961</guid>
					<description>thompsonson, I will try to post the script soon as it's already done but I'm not going to have much time to correct possible bugs ;)</description>
		<content:encoded><![CDATA[<p>thompsonson, I will try to post the script soon as it&#8217;s already done but I&#8217;m not going to have much time to correct possible bugs <img src='http://fromvega.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
				</item>
	<item>
		<title>By: ganesh</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-963</link>
		<author>ganesh</author>
		<pubDate>Wed, 01 Oct 2008 07:06:57 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-963</guid>
					<description>i want to how to convert this into JSP. i just need to tweak $colors[]  into a ArrayList ? Then how to proceed ! Please give me direction!</description>
		<content:encoded><![CDATA[<p>i want to how to convert this into JSP. i just need to tweak $colors[]  into a ArrayList ? Then how to proceed ! Please give me direction!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Loo</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-973</link>
		<author>Loo</author>
		<pubDate>Sat, 18 Oct 2008 11:39:33 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-973</guid>
					<description>Hi, for anyone who wants to call their array from a database, you need to do the following:
$colors = array();
$query = mysql_query("SELECT * FROM tablename") or die (mysql_error());
while ($q = mysql_fetch_array($query)) {
$colors = $q["color"];
}

This code works really well, I'm using it for a postcode search, but it does tend to slow when there are a lot of results, so I also added:
$part = $_GET['part'];
$length = strlen($part);
// check the parameter
if(isset($_GET['part']) and $_GET['part'] != '' and $length &#62; 3)
{
Otherwise the script can upset the browser.  I am using it to search 56,000 entries, hence the $length stopping the results until the user has entered more then 3 characters.

Hope this helps someone</description>
		<content:encoded><![CDATA[<p>Hi, for anyone who wants to call their array from a database, you need to do the following:<br />
$colors = array();<br />
$query = mysql_query(&#8221;SELECT * FROM tablename&#8221;) or die (mysql_error());<br />
while ($q = mysql_fetch_array($query)) {<br />
$colors = $q[&#8221;color&#8221;];<br />
}</p>
<p>This code works really well, I&#8217;m using it for a postcode search, but it does tend to slow when there are a lot of results, so I also added:<br />
$part = $_GET[&#8217;part&#8217;];<br />
$length = strlen($part);<br />
// check the parameter<br />
if(isset($_GET[&#8217;part&#8217;]) and $_GET[&#8217;part&#8217;] != &#8221; and $length &gt; 3)<br />
{<br />
Otherwise the script can upset the browser.  I am using it to search 56,000 entries, hence the $length stopping the results until the user has entered more then 3 characters.</p>
<p>Hope this helps someone</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: alp</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-985</link>
		<author>alp</author>
		<pubDate>Thu, 23 Oct 2008 13:51:30 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-985</guid>
					<description>thanks a lot</description>
		<content:encoded><![CDATA[<p>thanks a lot</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Andrew Heiss</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1173</link>
		<author>Andrew Heiss</author>
		<pubDate>Tue, 18 Nov 2008 13:29:43 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1173</guid>
					<description>Any update on making it work with multiple fields?</description>
		<content:encoded><![CDATA[<p>Any update on making it work with multiple fields?</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Michael Dale</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1176</link>
		<author>Michael Dale</author>
		<pubDate>Mon, 24 Nov 2008 23:21:53 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1176</guid>
					<description>Hi fromvega,

Great script. Any news when the multiple version will be ready?

Thanks!</description>
		<content:encoded><![CDATA[<p>Hi fromvega,</p>
<p>Great script. Any news when the multiple version will be ready?</p>
<p>Thanks!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: fromvega</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1177</link>
		<author>fromvega</author>
		<pubDate>Mon, 24 Nov 2008 23:50:10 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1177</guid>
					<description>Hello Andrew and Michael, I wrote the multiple version some time ago. But unfortunatly it was in an old hard disk that got corrupted. I'm going to try to recover its data by the end of the week.</description>
		<content:encoded><![CDATA[<p>Hello Andrew and Michael, I wrote the multiple version some time ago. But unfortunatly it was in an old hard disk that got corrupted. I&#8217;m going to try to recover its data by the end of the week.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Paulo</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1200</link>
		<author>Paulo</author>
		<pubDate>Fri, 09 Jan 2009 00:22:01 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1200</guid>
					<description>hello fromvega, great job, very helpfull to me. Paulo</description>
		<content:encoded><![CDATA[<p>hello fromvega, great job, very helpfull to me. Paulo</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: sithot28</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1212</link>
		<author>sithot28</author>
		<pubDate>Mon, 09 Feb 2009 09:24:42 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1212</guid>
					<description>Hi fromvega,
great plugin, but it won't working when element inside another , for example element inside jquery.layout (http://www.fabrizioballiano.net)</description>
		<content:encoded><![CDATA[<p>Hi fromvega,<br />
great plugin, but it won&#8217;t working when element inside another , for example element inside jquery.layout (http://www.fabrizioballiano.net)</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Thilina</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1219</link>
		<author>Thilina</author>
		<pubDate>Thu, 05 Mar 2009 14:09:41 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1219</guid>
					<description>Hi fromvega,

grate tutorial.thanks a lot. But I downloaded the sample code. But they didn't work. I can figure out why is that. Please help. Thanks</description>
		<content:encoded><![CDATA[<p>Hi fromvega,</p>
<p>grate tutorial.thanks a lot. But I downloaded the sample code. But they didn&#8217;t work. I can figure out why is that. Please help. Thanks</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Zoran</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1240</link>
		<author>Zoran</author>
		<pubDate>Sun, 07 Jun 2009 15:00:37 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1240</guid>
					<description>Hello, great script u have made. But, can u make changes in script to highlight searched term in result eg. &lt;strong&gt;or&lt;/strong&gt; in orange.

Regards!</description>
		<content:encoded><![CDATA[<p>Hello, great script u have made. But, can u make changes in script to highlight searched term in result eg. <strong>or</strong> in orange.</p>
<p>Regards!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Linda</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1250</link>
		<author>Linda</author>
		<pubDate>Fri, 19 Jun 2009 21:40:22 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1250</guid>
					<description>I really appreciate this tutorial, because everything I had read was using mysql, and we use informix se. With your help, I was able to get my output to match yours and from that to get autocomplete to work with our codeigniter application.  Thanks!</description>
		<content:encoded><![CDATA[<p>I really appreciate this tutorial, because everything I had read was using mysql, and we use informix se. With your help, I was able to get my output to match yours and from that to get autocomplete to work with our codeigniter application.  Thanks!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Shweta</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1259</link>
		<author>Shweta</author>
		<pubDate>Mon, 20 Jul 2009 09:59:52 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1259</guid>
					<description>Hi fromvega,

U have put great script. But can u do favor in some other way. I was in search of same script and found it from u but 1 extra and different requirement is, 

Here in your case if I type "r" in textbox red is displayed as a autosuggest list.

I want is if I type "r" in textbox and then click on submit button then red should come in same way as autocomplete you are showing. here extra thing is submit (click event). not sure how can i implement with JSON in your code.

Thanks in advance. If u can help it would be great.</description>
		<content:encoded><![CDATA[<p>Hi fromvega,</p>
<p>U have put great script. But can u do favor in some other way. I was in search of same script and found it from u but 1 extra and different requirement is, </p>
<p>Here in your case if I type &#8220;r&#8221; in textbox red is displayed as a autosuggest list.</p>
<p>I want is if I type &#8220;r&#8221; in textbox and then click on submit button then red should come in same way as autocomplete you are showing. here extra thing is submit (click event). not sure how can i implement with JSON in your code.</p>
<p>Thanks in advance. If u can help it would be great.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: PADO</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1278</link>
		<author>PADO</author>
		<pubDate>Wed, 23 Sep 2009 09:37:13 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1278</guid>
					<description>Great script, easy to use and implement into site.

Thanks !!</description>
		<content:encoded><![CDATA[<p>Great script, easy to use and implement into site.</p>
<p>Thanks !!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Arun</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1282</link>
		<author>Arun</author>
		<pubDate>Sat, 03 Oct 2009 07:39:33 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1282</guid>
					<description>Nice, very useful script. ;)</description>
		<content:encoded><![CDATA[<p>Nice, very useful script. <img src='http://fromvega.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
				</item>
	<item>
		<title>By: AbdelRahman Awad</title>
		<link>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1314</link>
		<author>AbdelRahman Awad</author>
		<pubDate>Thu, 04 Mar 2010 19:12:46 +0000</pubDate>
		<guid>http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/#comment-1314</guid>
					<description>Hi thanks alot for all your efforts

i made a new auto complete plugin for auto complete which is very simillar to the Facebook search check it out 

http://blog.halwsa.net/2010/jquery-autocomplete-search/

Cheers</description>
		<content:encoded><![CDATA[<p>Hi thanks alot for all your efforts</p>
<p>i made a new auto complete plugin for auto complete which is very simillar to the Facebook search check it out </p>
<p><a href="http://blog.halwsa.net/2010/jquery-autocomplete-search/" rel="nofollow">http://blog.halwsa.net/2010/jquery-autocomplete-search/</a></p>
<p>Cheers</p>
]]></content:encoded>
				</item>
</channel>
</rss>
