ok
Direktori : /home2/selectio/www/lilyexpresslive/software/admin/js/ |
Current File : /home2/selectio/www/lilyexpresslive/software/admin/js/validatePickupEdit.js |
$(document).ready(function(){ /*********** For fetching customer address and phone number ***********/ $('#customer_id').on('change',function(){ var cust_id=$(this).val(); if(cust_id){ $.ajax({ type:'POST', url:'get_customer_data.php', data:{id:cust_id}, dataType: 'json', success:function(response){ var len = response.length; $('textarea#address').val(response[0]['address']); $('#phone').val(response[0]['mobile']); $('#city').val(response[0]['city']); $('#state').val(response[0]['state']); $('#pincodes').val(response[0]['pincode']); $('#destination').val(response[0]['destination']); address_limit(); } }); } }); /*********** For fetching gst number ***********/ $('#client_id').on('change',function(){ var client_id=$(this).val(); if(client_id){ $.ajax({ type:'POST', url:'get_client_data.php', data:{id:client_id}, dataType: 'json', success:function(response){ var len = response.length; $('#gst').val(response[0]['gst']); } }); } }); /*********** For fetching Customer ***********/ $('#client_id').on('change',function(){ var client_id=$(this).val(); // alert(client_id); if(client_id){ $.ajax({ type:'POST', url:'get_client_selection.php', data:{id:client_id}, success:function(html){ $('#customer_id').html(html); } }); } }); }); function formValidate() { var valid = 1; if ($('#client_id').val() == 'none') { $('#client_id_txt').text('Please select the Client'); $('#client_id_txt').css('color', 'red'); valid=0; } else { $('#client_id_txt').text(''); } if ($('#customer_id').val() == 'none') { $('#customer_id_txt').text('Please select the Customer'); $('#customer_id_txt').css('color', 'red'); valid=0; } else { $('#customer_id_txt').text(''); } if ($('#awb_value').val() == 'no') { $('#awb_txt').text('Please Enter Valid AWB Number'); $('#awb_txt').css('color', 'red'); valid=0; } else { $('#awb_txt').text(''); } return valid; }