skip to Main Content

How to add Ajax response to div in html – Jquery ajax

How to append Ajax response to div in HTML This is my ajax Code $(document).ready(function(){ $('.credit,.debit').change(function(){ var value=$(this).val(); $.ajax({ type:"POST", url:"<?php echo base_url();>index.php/Transactions/getamountbyid", data:{id:value}, success:function(result){ console.log(result); $(".bal").html(result); } }); }); }); This is my controller Code public function getamountbyid(){ $id=$this->input->post('id');…

VIEW QUESTION
Back To Top
Search