I'm having difficulty sending the variable to this Ajax page, the keywords and sortBy variables are passing correctly.
Any ideas ?
<script>
function searchFilter(page_num) {
page_num = page_num?page_num:0;
var keywords = $('#keywords').val();
var sortBy = $('#sortBy').val();
var id = $('#id').val();
$.ajax({
type: 'POST',
url: 'https://techhum.com/jquery-ajax-pagination-with-search-master/getData.php',
data:'page='+page_num+'&keywords='+keywords+'&sortBy='+sortBy+'&id='+id,
beforeSend: function () {
$('.loading-overlay').show();
},
success: function (html) {
$('#posts_content').html(html);
$('.loading-overlay').fadeOut("slow");
}
});
}
</script>
question from:
https://stackoverflow.com/questions/65680320/want-to-pass-id-variable-to-existing-ajax-page 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…