2
Good morning, everyone,
I’m having a question:
i have a select that takes the one array from the database, and every time the user changes the select it has a change in javascript that update it in an input of type Hidden >
<input id="id_clinic_hidden" hidden name="clinic_id">
the javascript function is this:
$(document).ready(function () {
$(document).on("change", "#doc_sel_clinic", function(){
var id = $(this).val();
$("#id_clinic_hidden").val(id);
alert(id);
});
});
What I want to do is take this javascript id variable for php, it can be via session. This is inside javascript because I need to change the value when the user changes the select.
thank you
Hello, I’m not in the notebook yet to test, but this updates the variable every time the onchange event happens?
– jona1has