Files
click-erp/public/assets/js/senderid.js

36 lines
1.1 KiB
JavaScript
Vendored

$(document).ready(function(){
$('#directMno').change(function(tve){
tve.preventDefault();
// var theIDD = $(this).siblings('.shortCodeEntryRowId').val();
var directMnoSelection = $(this).val();
$.ajax({
type: "GET",
url: base_url + '/senderids/get-mno-list/' + directMnoSelection,
processData: false,
contentType: false,
async: false,
success: function (data){
if (data.code === 1) {
$('#networkName').empty();
$.each(data.result, function(id, row) {
// console.log(row);
$('#networkName').append($("<option />").val(row.id).text(row.name));
});
}
else if (data.code > 1) {
$.alert({
title: 'Alert!',
content: data.msg,
});
}
else {
$.alert({
title: 'Alert!',
content: 'Your request could not be handled. Try again !',
});
}
}
});
});
});