Answer the question
In order to leave comments, you need to log in
ajax not working in firefox?
Works fine in all browsers. Not in Firefox
$('#formFilter').on('change','#selectBrand',function(){
var val = $('#selectBrand').val();
var aaa = window.location.href
aaa = aaa.split("/")[2];
aaa = 'http://'+aaa;
$.ajax({
url:aaa+"/admin/ajaxFilter",
type:"POST",
data: ({brand: val}),
dataType:"json",
success:function(data){
$('#selectModel').html('<option value="">Выберите модель</option>')
for (var i in data){
$('#selectModel').append('<option value="'+data[i]+'">'+data[i]+'</option>')
}
}
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question