<script type="text/javascript">
$("#org_id").change(function() {
var org_id = $('#org_id').val();
var id = parseInt(org_id);
$.ajax({
url: "<?php echo base_url(); ?>Frontdoor/get_parameter_value",
method: 'POST',
data: {
id: id
},
dataType: "json",
success: function(response) {
html1 = '';
html2 = '';
for (var i = 0; i < response.data.length; i = i + 1) {
html1 += '<option value="' + response.data[i].id + '">' + response.data[i].parameter_name + '</option>';
html2 += '<option value="' + response.data[i].id + '">' + response.data[i].p_answer + '</option>';
}
$('.que_ans').html(html1);
$('.que_ans').trigger("chosen:updated");
$('.que_ans1').html(html2);
}
});
});
</script>