Denmark Puso

Denmark Puso

  • NA
  • 16
  • 957

Cant trigger ajax when im using editableSelect();?

Feb 14 2020 9:25 PM
im using editableSelect to make my dropdownList editable but my ajax not trigger what is the problem? but when i try to erase the code editable my ajax code is working fine what is the problem? Thanks
 
 
  1. var tes = $('#s-clients').editableSelect();  
  2.   
  3.     $(tes).on('change'function () {  
  4.         var client = $(this).val();  
  5.         $.ajax({  
  6.             type: 'POST',  
  7.             url: '@Url.Action("getclient", "order")',  
  8.             data: { client: client },  
  9.             dataType: "json",  
  10.             success: function (data) {  
  11.                 debugger;  
  12.                 $('#s-clients').val(data.ClientId);  
  13.                 $('#s-states').val(data.StateId);  
  14.   
  15.                 getCitiesByStateId(data.StateId, client);  
  16.                 //$('#s-cities').val(data.CityId);  
  17.                 $('#txt-postcode').val(data.Postcode);  
  18.                 $('#txt-address').val(data.Address);  
  19.             }  
  20.         });  
  21.     });  

Answers (3)