Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('select[name="id_ssh"]').on('change', function() {
- var id_ssh = $(this).val();
- if(id_ssh) {
- $.ajax({
- url: '<?php echo base_url("econtrolling_users/get_harga/") ?>'+id_ssh,
- type: "GET",
- dataType: "json",
- success:function(data) {
- $('select[name="harga"]').empty();
- $.each(data, function(key, value) {
- $('select[name="harga"]').append('<option value="'+ value.id_ssh +'">'+ formatNumber(value.harga)+'</option>');
- });
- }
- });
- }else{
- $('select[name="harga"]').empty();
- }
- });
- $('select[name="id_ssh"]').on('change', function() {
- var id_ssh = $(this).val();
- if(id_ssh) {
- $.ajax({
- url: '<?php echo base_url("econtrolling_users/get_satuan/") ?>'+id_ssh,
- type: "GET",
- dataType: "json",
- success:function(data) {
- $('select[name="satuan"]').empty();
- $.each(data, function(key, value) {
- $('select[name="satuan"]').append('<option value="'+ value.id_ssh +'">'+ value.satuan+'</option>');
- });
- }
- });
- }else{
- $('select[name="satuan"]').empty();
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement