I have a form with two dropdown 'clinic' and 'services'. Now 'service' dropdown will update according to the change of 'clinic' dropdown.
Now the data of 'service' and 'clinic' are stored in another website database.
I have already fetched 'clinic' data using cURL. But since I have to update 'service' dropdown on runtime that's why I am trying to fetch 'service' data using AJAX.
HTML
<form method="post">
<div class="chosen-select-single mg-b-20">
<label><b>Select Clinic : </b></label>
<select data-placeholder="Choose a Clinic..." class="chosen-select" tabindex="-1" name="clinic" id="clinic_id">
<option value="">Select One</option>
<?php foreach($clinic_datum as $data) { ?>
<option value="<?php echo $data->id;?>"><?php echo $data->name?></option>
<?php } ?>
</select>
<?php if($clinicErr != "") { ?>
<span class="error">* <?php echo $clinicErr;?></span>
<?php } ?>
</div>
</form>
AJAX
jQuery("#clinic_id").change(function() {
var clinic_id = $('#clinic_id').val();
if(clinic_id.trim() != '') {
jQuery.ajax({
url: "http://www.sencare.com.bd/service_data_curl",
type: 'GET',
dataType: 'jsonp',
data: {clinic_id : clinic_id},
success: function(msg) {
console.log('msg');
}
});
}
});
But I get this error
Cross-Origin Read Blocking (CORB) blocked cross-origin response http://www.sencare.com.bd/service_data_curl?callback=jQuery1113005791399070777792_1542690562198&clinic_id=2&_=1542690562199 with MIME type text/html. See https://www.chromestatus.com/feature/5629709824032768 for more details
How to solve this ... Anybody help please ?