I have several jQuery autocomplete searches set up like this one. They all work as expected in safari, chrome and opera but not in firefox.
Any ideas what could make firefox choke, have i used deprecated code? the jQuery ui example looks more simple but its not ajax and this method below is the way i could get it to work.
Would appreciate a pointer as to why it doesnt work in firefox.
$('#typeCode').autocomplete({
appendTo: "#typeLeft",
source: 'maType/typeSearch.php',
minLength: 2,
select: function(event, ui) {
//alert( "You selected: "+ui.item.museum_city);
var $itemrow = $(this).closest('tr');
$itemrow.find('#typeCode').val(ui.item.content+ " "+ ui.item.museum_city + " " + ui.item.museum_state_name);
$.ajax({
url: "maType/typeSearchByName.php?Type="+ui.item.content+"&City="+ ui.item.museum_city +"&StateName="+ ui.item.museum_state_name+"",
cache: true,
type: 'get',
success: function(data) {
$('#typeRight').fadeOut('100', function(){
$(this).html(data).fadeIn('250')
});
} // success
}); // ajax
// Give focus to the next input field to recieve input from user
$('#itemQty').focus();
return false;
}
// Format the list menu output of the autocomplete
}).data( "autocomplete" )._renderItem = function( ul, item ) {
return $( "<li></li>" )
.data( "item.autocomplete", item )
.append( "<a>" + item.content + " "+ item.museum_city + " " + item.museum_state_name +"</a>" )
.appendTo( ul );
};
Aucun commentaire:
Enregistrer un commentaire