Koala Koala - 1 year ago 295
Ajax Question

update parameters variable on change.search using bootgrid with structured-filter

I am using https://github.com/evoluteur/structured-filter and http://www.jquery-bootgrid.com/ to create an advanced search through ajax/php.

Initially the code works and returns the data from the php file, but when trying to use structured-filter to pass

variables to the php file through the use of jquery-bootgrid I am struggling.

No matter what I try, the url it is posting to has no
variables, I have tried
but nothing changes.

It appears the
variable is just not updating.

Here is my jquery script in full:

<script type="text/javascript">
$(document).ready(function() {
fields: [{
type: "text",
id: "gamertag",
label: "Gamertag"
}, {
type: "text",
id: "name",
label: "Team Name"
}, {
type: "number",
id: "wagePerMatch",
label: "Wage Per Match"
}, {
type: "number",
id: "gamesRemaining",
label: "Contract Games Remanining"
}, {
type: "boolean",
id: "transferListed",
label: "Transfer Listed"


var params = "";
$("#myFilter").on("change.search", function(event) {
var params = $("#myFilter").structFilter("valUrl");
console.log(params); // works, returns params

ajax: true,
url: function() {
return "/api/search.php?" + params; // params never updates?


Is there a way to update params in
when it changes in
as right now its only sending requests to
(missing the parameters)

Answer Source
Now i don't have to much reputation, i am unable to add comment on this,

Please check this below URL, hope this will help you


if you are looking for append the rows in existing grid so you can use "append" as given in URL or if you want to update the whole table you can destory the table and re-create a "bootgrid" object with binding with the respective DOM id's

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download