Additional variables for sql query

Additional variables for sql query

jotexjotex Posts: 1Questions: 1Answers: 0

Hi there!
I have smth like this:

"ajax": {
        "url": "ajax/zamowienie_szukaj_adres.php", 
    "data": function ( d ) {
        d.klient_id = $('#klient_id').val();
    }
        }

and variable "klient_id" works fine if the value of #klient_id is set on page load.
Is any posibility to send additional data, which is changed dynamically by jquery?

<input type="text" name="klient_id" value="1" />
$(#klient_id").val(2));
still gives me 1 in "zamowienie_szukaj_adres.php"

This discussion has been closed.