php - How not to allow generating selection using comma and tab jquery autosuggest? -


hey guys, i'm using jquery's autosuggest , it's working great, 1 question. if user types , it's not there click comma or tab , adds value. question is, how can disable , allow him select results , nothing else?

<script type="text/javascript">  $(function(){     var data = {items: [     <?php       $mysql=mysql_connect('localhost','samaniac','ghobisdabomb');     mysql_select_db('jmtdy');     $result=mysql_query("select * users username='".$_session['username']."'") or die(mysql_error());     $dbarray=mysql_fetch_assoc($result);     $result2=mysql_query("select * friendship userid='".$dbarray['id']."'");     while($dbarray2=mysql_fetch_assoc($result2)){         $result3=mysql_query("select * users id='".$dbarray2['friendid']."'");         $dbarray3=mysql_fetch_assoc($result3);           echo '{value: "'.$dbarray3['id'].'", name: "'.$dbarray3['username'].'"},';         }         ?> ]}; $("#suggestedfriend").autosuggest(data.items, {selecteditemprop: "name", searchobjprops: "name", ashtmlid: "clippedon", starttext: "enter username",retrievelimit:5}); });        </script> 

and yes know i'm using php in jquery script, it's working way want to.

what need combo plugin , not autosuggest. autosuggest per definition suggests , not forces, work customise jquery autosuggest has largest use combo plugin

try http://code.google.com/p/sexy-combo/


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -