i assume you are using this plugin? http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/
if so, why did you put the call to autocomplete() inside an event handler? normally autocomplete() is called on page ready and it establishes its own event handlers. On 5/22/09 1:50 PM, "the_guru" <l.rajibah...@gmail.com> wrote: > my script is-> > > $(".stock_item").live("keypress",function(){ > console.log($(this)); > $(this) > .autocomplete("includes/pages/stock_item_autocomplete.php",{ > width:150, > max:5, > multiple: true, > }).result(function(){ > > var name= $(this).val(); > > if(name.match("#")){ > var stock_id= parseInt( name.split("#")[0]); > > $(this).val(name.split("#")[1]); > > $(this).next("input[name=stock_item[]]").val(stock_id); > } > }); > > }); > > this script gets the 1#Nokia1166 and stores the 1 into the hidden > field but > my problem is it does not trigger even on the first time and some time > not at all > > help needed ....please