Answer the question
In order to leave comments, you need to log in
Ajax sending empty post request?
<input type="text" class="who" name="referal" placeholder="Поиск" value="">
$(document).ready(function() {
$('.who').change(function() {
st=$(this).serialize();
alert(st);
$.ajax({
type: 'get',
url: '/admin/search',
dаta: $(this).serialize(),
success: function(data){
alert(data);
dat=jQuery.parseJSON(data);
$(".search_result").html(dat);
}
})
});});
Answer the question
In order to leave comments, you need to log in
What is the reason why ajax sends empty post request?Everything is as always:
Use the oninput event instead of change, in my opinion this is exactly what you need
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question