views:

12

answers:

0

Hello guys, I'm trying to do something with the TextboxList (plugin) (jQuery) and I just can't get it to work. I have two "TextboxList" in my page one next to the other. When I'm in the first "textbox" and I press the "enter" key to select the item, I want to set the focus in the next "textbox". I managed to do that with the code below:

var tbox1 = new $.TextboxList('#textboxlist1', { unique: true, max: '1', plugins: { autocomplete: {highlight: true, onlyFromValues: true}} });
tbox1.addEvent('bitBoxAdd', function() {  $("#textboxlist2").focus(); });

It works great. As soon as I press the "enter" key, I select the "bitbox" that I want and the "textboxlist2" gets the focus. The problem is that the "tbox1" keep displaying the "suggestions". I would like to know if there is a way to hide the suggestions or if you suggest a better way to do what I'm trying to do.

See the pics: alt text

Thanks a lot!!! Guillermo Guerini