<?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: jQuery Auto Suggest with MySQL</title>
	<atom:link href="http://jonathanstegall.com/2009/09/28/jquery-auto-suggest-with-mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanstegall.com/2009/09/28/jquery-auto-suggest-with-mysql/</link>
	<description>culture, design, spirituality</description>
	<lastBuildDate>Tue, 07 Feb 2012 19:22:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: zia</title>
		<link>http://jonathanstegall.com/2009/09/28/jquery-auto-suggest-with-mysql/#comment-2424</link>
		<dc:creator>zia</dc:creator>
		<pubDate>Sun, 20 Nov 2011 20:04:28 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanstegall.com/?p=2024#comment-2424</guid>
		<description>hi
how can i use this for combo box... as you see in www.justdial.com
once we get auto suggest on city box, i want to populate the locality box in same manner, how do i pass the city value to locality query.</description>
		<content:encoded><![CDATA[<p>hi<br />
how can i use this for combo box&#8230; as you see in <a href="http://www.justdial.com" rel="nofollow">http://www.justdial.com</a><br />
once we get auto suggest on city box, i want to populate the locality box in same manner, how do i pass the city value to locality query.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: diego</title>
		<link>http://jonathanstegall.com/2009/09/28/jquery-auto-suggest-with-mysql/#comment-2300</link>
		<dc:creator>diego</dc:creator>
		<pubDate>Sun, 24 Jul 2011 22:10:55 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanstegall.com/?p=2024#comment-2300</guid>
		<description>Hi Jonathan, it work great! thanks for post these examples. But i must do a submit for the name i found, but sending another variable, not the name, an numder id. In the query i found and show the two var, but i dont know how send it.

Thanks!

Diego</description>
		<content:encoded><![CDATA[<p>Hi Jonathan, it work great! thanks for post these examples. But i must do a submit for the name i found, but sending another variable, not the name, an numder id. In the query i found and show the two var, but i dont know how send it.</p>
<p>Thanks!</p>
<p>Diego</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ankit</title>
		<link>http://jonathanstegall.com/2009/09/28/jquery-auto-suggest-with-mysql/#comment-2279</link>
		<dc:creator>ankit</dc:creator>
		<pubDate>Sun, 19 Jun 2011 06:08:40 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanstegall.com/?p=2024#comment-2279</guid>
		<description>the problem with me is that in this code of auto complete,after the textbox is populated with the input,the list is not disappearing.it is going behind the text boxes and remining there.also the listbox is not getting to the length and width of the suggestions list.Can anyone help please
-----------------------------------------------
jquery code
**********************





Ajax Auto Suggest



	function lookup(inputString) 
    {
		if(inputString.length == 0) 
        {
			// Hide the suggestion box.
			$(&#039;#suggestions&#039;).hide();
		} 
          else 
          {
			$.post(&quot;rpc.php&quot;, {queryString: &quot;&quot;+inputString+&quot;&quot;}, function(data)
            {
				if(data.length &gt;0) 
                {
					$(&#039;#suggestions&#039;).show();
					$(&#039;#autoSuggestionsList&#039;).html(data);
				}
			});
		}
	} // lookup
	
	function fill(thisValue) {
		$(&#039;#inputString&#039;).val(thisValue);
		setTimeout(&quot;$(&#039;#suggestions&#039;).hide();&quot;, 200);
	}



	body {
		font-family: Helvetica;
		font-size: 11px;
		color: #000;
	}
	
	h3 {
		margin: 0px;
		padding: 0px;	
	}

	.suggestionsBox {
		position: absolute;
        top: 85px;
		left: 450px;
		margin: 10px 0px 0px 0px;
		width: 200px;  
		background-color: #323943;
		-moz-border-radius: 7px;
		-webkit-border-radius: 7px;
		border: 2px solid #000;	
		color: #fff;
	}
	
	.suggestionList {
		margin: 0px;
		padding: 0px;
	}
	
	.suggestionList li {
		
		margin: 0px 0px 3px 0px;
		padding: 3px;
		cursor: pointer;
	}
	
	.suggestionList li:hover {
		background-color: #323943;
	}







	
		
			
				Type your name:
				
				
			
&#160;
				
			
		
	






#############################################
php-mysql database code
$$$$$$$$$$$$$$$$$$$$$$$$$$$$
real_escape_string($_POST[&#039;queryString&#039;]);

        // Is the string length greater than 0?

        if (strlen($queryString) &gt; 0)
        {
            // Run the query: We use LIKE &#039;$queryString%&#039;
            // The percentage sign is a wild-card, in my example of countries it works like this...
            // $queryString = &#039;Uni&#039;;
            // Returned data = &#039;United States, United Kindom&#039;;

            // YOU NEED TO ALTER THE QUERY TO MATCH YOUR DATABASE.
            // eg: SELECT yourColumnName FROM yourTable WHERE yourColumnName LIKE &#039;$queryString%&#039; LIMIT 10

            $query = $db-&gt;query(&quot;SELECT first_name FROM info WHERE first_name LIKE &#039;$queryString%&#039;  LIMIT 5&quot;);
            if ($query)
            {
                // While there are results loop through them - fetching an Object (i like PHP5 btw!).
                while ($result = $query-&gt;fetch_object())
                {
                    // Format the results, i m using  for the list, you can change it.
                    // The onClick function fills the textbox with the result.

                    // YOU MUST CHANGE: $result-&gt;value to $result-&gt;your_colum
                    echo &#039;first_name . &#039;\&#039;);&quot;&gt;&#039; . $result-&gt;first_name . &#039;&#039;;
                }
            }
            else
            {
                echo &#039;ERROR: There was a problem with the query.&#039;;
            }
        }
        else
        {
            // Dont do anything.
        } // There is a queryString.
    }
    else
    {
        echo &#039;There should be no direct access to this script!&#039;;
    }
}

?&gt;
=================================================</description>
		<content:encoded><![CDATA[<p>the problem with me is that in this code of auto complete,after the textbox is populated with the input,the list is not disappearing.it is going behind the text boxes and remining there.also the listbox is not getting to the length and width of the suggestions list.Can anyone help please<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
jquery code<br />
**********************</p>
<p>Ajax Auto Suggest</p>
<p>	function lookup(inputString)<br />
    {<br />
		if(inputString.length == 0)<br />
        {<br />
			// Hide the suggestion box.<br />
			$(&#8216;#suggestions&#8217;).hide();<br />
		}<br />
          else<br />
          {<br />
			$.post(&#8220;rpc.php&#8221;, {queryString: &#8220;&#8221;+inputString+&#8221;"}, function(data)<br />
            {<br />
				if(data.length &gt;0)<br />
                {<br />
					$(&#8216;#suggestions&#8217;).show();<br />
					$(&#8216;#autoSuggestionsList&#8217;).html(data);<br />
				}<br />
			});<br />
		}<br />
	} // lookup</p>
<p>	function fill(thisValue) {<br />
		$(&#8216;#inputString&#8217;).val(thisValue);<br />
		setTimeout(&#8220;$(&#8216;#suggestions&#8217;).hide();&#8221;, 200);<br />
	}</p>
<p>	body {<br />
		font-family: Helvetica;<br />
		font-size: 11px;<br />
		color: #000;<br />
	}</p>
<p>	h3 {<br />
		margin: 0px;<br />
		padding: 0px;<br />
	}</p>
<p>	.suggestionsBox {<br />
		position: absolute;<br />
        top: 85px;<br />
		left: 450px;<br />
		margin: 10px 0px 0px 0px;<br />
		width: 200px;<br />
		background-color: #323943;<br />
		-moz-border-radius: 7px;<br />
		-webkit-border-radius: 7px;<br />
		border: 2px solid #000;<br />
		color: #fff;<br />
	}</p>
<p>	.suggestionList {<br />
		margin: 0px;<br />
		padding: 0px;<br />
	}</p>
<p>	.suggestionList li {</p>
<p>		margin: 0px 0px 3px 0px;<br />
		padding: 3px;<br />
		cursor: pointer;<br />
	}</p>
<p>	.suggestionList li:hover {<br />
		background-color: #323943;<br />
	}</p>
<p>				Type your name:</p>
<p>&nbsp;</p>
<p>#############################################<br />
php-mysql database code<br />
$$$$$$$$$$$$$$$$$$$$$$$$$$$$<br />
real_escape_string($_POST['queryString']);</p>
<p>        // Is the string length greater than 0?</p>
<p>        if (strlen($queryString) &gt; 0)<br />
        {<br />
            // Run the query: We use LIKE &#8216;$queryString%&#8217;<br />
            // The percentage sign is a wild-card, in my example of countries it works like this&#8230;<br />
            // $queryString = &#8216;Uni&#8217;;<br />
            // Returned data = &#8216;United States, United Kindom&#8217;;</p>
<p>            // YOU NEED TO ALTER THE QUERY TO MATCH YOUR DATABASE.<br />
            // eg: SELECT yourColumnName FROM yourTable WHERE yourColumnName LIKE &#8216;$queryString%&#8217; LIMIT 10</p>
<p>            $query = $db-&gt;query(&#8220;SELECT first_name FROM info WHERE first_name LIKE &#8216;$queryString%&#8217;  LIMIT 5&#8243;);<br />
            if ($query)<br />
            {<br />
                // While there are results loop through them &#8211; fetching an Object (i like PHP5 btw!).<br />
                while ($result = $query-&gt;fetch_object())<br />
                {<br />
                    // Format the results, i m using  for the list, you can change it.<br />
                    // The onClick function fills the textbox with the result.</p>
<p>                    // YOU MUST CHANGE: $result-&gt;value to $result-&gt;your_colum<br />
                    echo &#8216;first_name . &#8216;\&#8217;);&#8221;&gt;&#8217; . $result-&gt;first_name . &#8221;;<br />
                }<br />
            }<br />
            else<br />
            {<br />
                echo &#8216;ERROR: There was a problem with the query.&#8217;;<br />
            }<br />
        }<br />
        else<br />
        {<br />
            // Dont do anything.<br />
        } // There is a queryString.<br />
    }<br />
    else<br />
    {<br />
        echo &#8216;There should be no direct access to this script!&#8217;;<br />
    }<br />
}</p>
<p>?&gt;<br />
=================================================</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: demha</title>
		<link>http://jonathanstegall.com/2009/09/28/jquery-auto-suggest-with-mysql/#comment-2252</link>
		<dc:creator>demha</dc:creator>
		<pubDate>Thu, 05 May 2011 03:48:47 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanstegall.com/?p=2024#comment-2252</guid>
		<description>Jonathan,

I would be glad to know how to implement the auto suggest.
 i have a text area , users enter some long description in that and whenever user enter @ symbol i need to autosuggest user the email followed by @ example 

abcdef@ some words , some words  no autosuugest
 xyz@

in the above whenever @ is their i need to display set of users autosuggest that start s from abcdef and again aftre some text if user enters xyz@  autosuggest when @ is entered


Please give me some pointers how to do this , as i am ne wto jquery and wannna try out this.

i hope you will have  some time for me to resolve this.

Thanks in Advance</description>
		<content:encoded><![CDATA[<p>Jonathan,</p>
<p>I would be glad to know how to implement the auto suggest.<br />
 i have a text area , users enter some long description in that and whenever user enter @ symbol i need to autosuggest user the email followed by @ example </p>
<p>abcdef@ some words , some words  no autosuugest<br />
 xyz@</p>
<p>in the above whenever @ is their i need to display set of users autosuggest that start s from abcdef and again aftre some text if user enters xyz@  autosuggest when @ is entered</p>
<p>Please give me some pointers how to do this , as i am ne wto jquery and wannna try out this.</p>
<p>i hope you will have  some time for me to resolve this.</p>
<p>Thanks in Advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guido</title>
		<link>http://jonathanstegall.com/2009/09/28/jquery-auto-suggest-with-mysql/#comment-2251</link>
		<dc:creator>Guido</dc:creator>
		<pubDate>Mon, 02 May 2011 01:43:29 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanstegall.com/?p=2024#comment-2251</guid>
		<description>It is not working in IE 9
Works good in Firefox 4</description>
		<content:encoded><![CDATA[<p>It is not working in IE 9<br />
Works good in Firefox 4</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan</title>
		<link>http://jonathanstegall.com/2009/09/28/jquery-auto-suggest-with-mysql/#comment-1910</link>
		<dc:creator>Jonathan</dc:creator>
		<pubDate>Sat, 11 Dec 2010 21:24:08 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanstegall.com/?p=2024#comment-1910</guid>
		<description>@&lt;a href=&quot;http://jonathanstegall.com/2009/09/28/jquery-auto-suggest-with-mysql/#comment-1908&quot; rel=&quot;nofollow&quot;&gt;ndhol&lt;/a&gt;: If I understand you correctly, you&#039;ll need to update the SQL and what actually gets sent to the browser. Have a look at &lt;a href=&quot;http://jonathanstegall.com/2009/09/28/jquery-auto-suggest-with-mysql/#comment-1280&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; earlier in the comments for this post.</description>
		<content:encoded><![CDATA[<p>@<a href="http://jonathanstegall.com/2009/09/28/jquery-auto-suggest-with-mysql/#comment-1908" rel="nofollow">ndhol</a>: If I understand you correctly, you&#8217;ll need to update the SQL and what actually gets sent to the browser. Have a look at <a href="http://jonathanstegall.com/2009/09/28/jquery-auto-suggest-with-mysql/#comment-1280" rel="nofollow">this</a> earlier in the comments for this post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ndhol</title>
		<link>http://jonathanstegall.com/2009/09/28/jquery-auto-suggest-with-mysql/#comment-1908</link>
		<dc:creator>ndhol</dc:creator>
		<pubDate>Sat, 11 Dec 2010 20:58:30 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanstegall.com/?p=2024#comment-1908</guid>
		<description>I Hi Jonathan, it&#039;s a great script. I had a table contain code_id and name_product column. Question is, how to implement an autocomplete which is show the name_product but then store the code_id value. Thank you</description>
		<content:encoded><![CDATA[<p>I Hi Jonathan, it&#8217;s a great script. I had a table contain code_id and name_product column. Question is, how to implement an autocomplete which is show the name_product but then store the code_id value. Thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: svani</title>
		<link>http://jonathanstegall.com/2009/09/28/jquery-auto-suggest-with-mysql/#comment-1791</link>
		<dc:creator>svani</dc:creator>
		<pubDate>Sun, 05 Dec 2010 10:46:40 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanstegall.com/?p=2024#comment-1791</guid>
		<description>KEY.RETURN:if(selectCurrent()){document.form.submit();}

:-))</description>
		<content:encoded><![CDATA[<p>KEY.RETURN:if(selectCurrent()){document.form.submit();}</p>
<p> <img src='http://jonathanstegall.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: svani</title>
		<link>http://jonathanstegall.com/2009/09/28/jquery-auto-suggest-with-mysql/#comment-1790</link>
		<dc:creator>svani</dc:creator>
		<pubDate>Sat, 04 Dec 2010 20:14:43 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanstegall.com/?p=2024#comment-1790</guid>
		<description>what about form auto submit, when clicking one item in suggestion list? :-)</description>
		<content:encoded><![CDATA[<p>what about form auto submit, when clicking one item in suggestion list? <img src='http://jonathanstegall.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Onur</title>
		<link>http://jonathanstegall.com/2009/09/28/jquery-auto-suggest-with-mysql/#comment-1783</link>
		<dc:creator>Onur</dc:creator>
		<pubDate>Fri, 26 Nov 2010 16:08:02 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanstegall.com/?p=2024#comment-1783</guid>
		<description>Hi Jonathan,
I&#039;m thankfull for the article as i&#039;ve been searching for a good example of autocomplete feature with jquery though the steps are much tough to take just to display a autocomplete box from database. However, unfortunately there are some problems related to CSS, actually related to browsers. I set the width paramater of plugin to a desirable value that fits well on Opera, whereas Firefox displays autocomplete field longer than i set, or conversely, it displays shorther textbox input. IE displays close to Opera. I didn&#039;t tested Safari and Chrome.

What the hell can we set CSS parameters cross-browser?

Any idea?

Thanks.</description>
		<content:encoded><![CDATA[<p>Hi Jonathan,<br />
I&#8217;m thankfull for the article as i&#8217;ve been searching for a good example of autocomplete feature with jquery though the steps are much tough to take just to display a autocomplete box from database. However, unfortunately there are some problems related to CSS, actually related to browsers. I set the width paramater of plugin to a desirable value that fits well on Opera, whereas Firefox displays autocomplete field longer than i set, or conversely, it displays shorther textbox input. IE displays close to Opera. I didn&#8217;t tested Safari and Chrome.</p>
<p>What the hell can we set CSS parameters cross-browser?</p>
<p>Any idea?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

