Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
164 views
in Technique[技术] by (71.8m points)

php - Want to pass ID variable to existing Ajax page

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...