jquery - CakePHP Sending data from view to controller via ajax -
i'm new cakephp. i'm trying make simple ajax request modify part of screen. i've found several examples on web, can't mix them together! when click button btnnewphon , want send content of input txtphon sent controller admincontroller. in view, div datatoshow updated show data sent controller. i'm there, don't know how send content of inputs phonid , phontxt controller , don't know how data in controller. here's code. view index.ctp : <div id="datatoshow"></div> <input id="phonid" type="text"> <input id="phontxt" type="text"> <button id="btnnewphon">new</button> ajax view ajax_response.ctp : <?php echo $content; ?> javascript admin.js (included in view): $(function() { $('#btnnewphon').click(function() { = $("#txtphon").val ; $.ajax({ type:"post", datatype:'json', cach