CHANGE_POLICY_NO_DUB : RV
This commit is contained in:
parent
3f19dea530
commit
439156863e
@ -129,7 +129,7 @@
|
|||||||
|
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="policy_no">Policy No<span class="text-danger">*</span></label>
|
<label for="policy_no">Policy No<span class="text-danger">*</span></label>
|
||||||
<input value="" type="text" class="form-control" placeholder="Enter Policy Number " name="policy_no" id="policy_no" required>
|
<input value="" type="text" class="form-control"oninput="checkPolicy No(this)" placeholder="Enter Policy Number" name="policy_no" id="policy_no" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -1832,33 +1832,35 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#policy_no').change(function(){
|
//check dublicate policy number
|
||||||
|
function checkPolicyNo() {
|
||||||
|
|
||||||
var policy_no = $(this).val();
|
var policy_no = $('#policy_no').val();
|
||||||
console.log(policy_no +'-'+policy_no.length);
|
console.log(policy_no + '-' + policy_no.length);
|
||||||
policy_no = policy_no.trim();
|
policy_no = policy_no.trim();
|
||||||
console.log(policy_no +'-'+policy_no.length);
|
console.log(policy_no + '-' + policy_no.length);
|
||||||
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '<?php echo base_url('util/check_policy_no/');?>'+policy_no,
|
url: '<?php echo base_url('util/check_policy_no/');?>' + policy_no,
|
||||||
type: "GET",
|
type: "GET",
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
|
console.log(res);
|
||||||
|
if (res.status == true) {
|
||||||
|
|
||||||
console.log(res)
|
|
||||||
if(res.status == true){
|
|
||||||
toastr.warning(res.message, 'warning');
|
toastr.warning(res.message, 'warning');
|
||||||
$('#policy_no').val('');
|
$('#policy_no').val('');
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function (xhr, status, error) {
|
error: function (xhr, status, error) {
|
||||||
console.error(xhr.responseText);
|
console.error(xhr.responseText);
|
||||||
console.error(status, error);
|
console.error(status, error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
})
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
// Check if the URL contains a hash
|
// Check if the URL contains a hash
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user