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">
|
||||
<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>
|
||||
|
||||
@ -1832,33 +1832,35 @@
|
||||
|
||||
}
|
||||
|
||||
$('#policy_no').change(function(){
|
||||
//check dublicate policy number
|
||||
function checkPolicyNo() {
|
||||
|
||||
var policy_no = $(this).val();
|
||||
console.log(policy_no +'-'+policy_no.length);
|
||||
var policy_no = $('#policy_no').val();
|
||||
console.log(policy_no + '-' + policy_no.length);
|
||||
policy_no = policy_no.trim();
|
||||
console.log(policy_no +'-'+policy_no.length);
|
||||
|
||||
console.log(policy_no + '-' + policy_no.length);
|
||||
|
||||
$.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",
|
||||
dataType: 'json',
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
if (res.status == true) {
|
||||
|
||||
console.log(res)
|
||||
if(res.status == true){
|
||||
toastr.warning(res.message, 'warning');
|
||||
$('#policy_no').val('');
|
||||
|
||||
}else{
|
||||
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
console.error(status, error);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
// Check if the URL contains a hash
|
||||
|
||||
Loading…
Reference in New Issue
Block a user