How about this? (#hidden is the id of the hidden input field you want
to fill in.)

$('#autocomplete').autocomplete({serviceUrl:'/your_directory/
your_file.php',
        onSelect: function(value, data){
                $('#hidden').val(data);
        }
});

On Jun 12, 5:22 pm, shaded <shad...@gmail.com> wrote:
> im a newbie trying to use the autocomplete plugin. I have a php array
> returning a name and an id.
>
> the autocomplete drop down displays only the first value before the |
> in   name|id
>
> This is fine but how do i get the 'id' part to be stored in a hidden
> field. I've looked at the examples 
> herehttp://view.jquery.com/trunk/plugins/autocomplete/demo/
> and it seems single bird does what i need, but im not sure how the
> hidden field get populated.
>
> please help
> thanks.

Reply via email to