Ajax Autocomplete for Jquery : How To Send Dynamic Parameters

前端 未结 6 1284
感情败类
感情败类 2021-01-17 22:03

i am using Ajax Autocomplete for Jquery ( http://www.devbridge.com/projects/autocomplete/jquery/ ) in one of my application. The Search Form looks something lik

6条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-17 22:49

    Might be an old question, but I feel that here's the best way to do it:

    $('#q').autocomplete({
        ...
        onSearchStart: function(q) {
            q.entity_type = $('#top_search_select').val();
        }
        ...
    });
    

提交回复
热议问题