I'm having a problem setting the value on multiple jQuery autocomplete combobox's.
I'm using the following code to select a value. This works well if there is only one combobox but if more than one it changes the value on multiple combobox's.
$('.ui-autocomplete-input').focus().val(memberData.clubName);
$('.ui-autocomplete-input').autocomplete('close');
Is there a way to make a combobox unique?
Here is the jQuery in full:
$('.amendButton').live('click', function() { var id = $(this).attr('rel');
$.ajax({
type : 'POST',
url : 'php/membershipProcessor.php',
dataType : 'json',
data: {
membershipID : id,
getMembership : "getMembership",
},
success : function(memberData){
$('#amendMembershipID').val(id),
$('#amendClubName').focus().val(memberData.clubName);
$('#amendClubName').autocomplete('close');
},
error : function(memberData){
alert(data.msg);
}
});
return false;
});
$(this)- Marnix