1👍
✅
I got it working by making corrections on the script as directed by @evergreen.
<script>
$("#id_year").change(function () {
var url = $("#examForm").attr("term-data");
var yearId = $(this).val();
$.ajax({
url: url,
data: {
'year': yearId
},
success: function (data) {
$("#id_term").html(data);
}
});
});
</script>
👤Ptar
Source:stackexchange.com