$("#company").ready(function () {
var url = $("#indexForm").attr("data-tget"); // get the url of the `yourpath` view
var group_id = $(this).val();
$("#client").change(function () {
var url = $("#indexForm").attr("data-tgetc"); // get the url of the `yourpath` view
var company_id = $(this).val(); // get the selected company ID from the HTML input
$.ajax({ // initialize an AJAX request
url: url, // set the url of the request (= localhost:8000/path/)
data: {
'company_id': company_id // add the programming id to the GET parameters
},
success: function (data) { // `data` is the return of the `path` view function
$("#company").html(data); // replace the contents of the course input with the data that came from the server
$("#company").ready(function () {
var url = $("#indexForm").attr("data-tget"); // get the url of the `yourpath` view
var group_id = $(this).val(); // get the selected company ID from the HTML input
$.ajax({ // initialize an AJAX request
url: url, // set the url of the request (= localhost:8000/path/)
data: {
'group_id': group_id // add the programming id to the GET parameters
},
success: function (data) { // `data` is the return of the `path` view function
$("#groupcomp").html(data); // replace the contents of the course input with the data that came from the server
} //success end
}); //ajax end
});
} //success end
}); //ajax end
}); //script end
<option value="необходимый параметр">Какие-то видимые данные</option>