Thanks - This is what I've ended up with:

$(document).ready(function(){

$("#lotno1").autocomplete("../js/autocomplete.php", {
        mustMatch: true,
        max: 30,
        extraParams: {
       SaleNo: function() { return $("#salenumber").val(); }
        }

});
$("#lotno1").result(function(event, data, formatted) {
                if (data)
                        $(this).parent().find("[EMAIL PROTECTED]").val(data[1]);
        });
});

Regards
Matt

On Aug 31, 9:36 am, Giovanni Battista Lenoci <[EMAIL PROTECTED]>
wrote:
> Mattl ha scritto:>                    
> $(this).parent().next().find("input").val(data[1]);
>
> The error is in this line:
>
> $(this) -> refers to the input with the autocomplete
>
> parent -> refers to the <p> containing the input fields
>
> next-> refers to the next <p> after the <p> that fired the autocomplete
>
> find(input).val(data[1]) -> finds the inputs contained in the selected p
> and assign to all these fields data[1]
>
> I think this would be work:
>
> $(this).next().val(data[1]);
>
> Bye :-)
>
> --
> gianiaz.net - web solutions
> p.le bertacchi 66, 23100 sondrio (so) - italy
> +39 347 7196482

Reply via email to