skip to Main Content

Ajax success data show undefind – Jquery

I return a array object data Ajax success result then i print li tag but its show undefind My Ajax code is $.ajax({ 'method': 'GET', 'url': base_url +'party/selectCities?id='+state, success: function(data) { var newData = data.replace(/"/g, "") if(newData == ""){ }else{…

VIEW QUESTION

Data pass to codeigniter to ajax the function not working – Jquery

I try to pass a data code igniter controller to ajax request the written function not working Controller public function selectPlaygrounds() { $data = $this->branchatm->getCitiesFromState($state); $result=''; if($data){ foreach($data as $list){ $result.="<li ng-click='sawAll($list->city);'>$list->city</li>"; } } sendJsonResponse($result); } Ajax call $.ajax({ 'method':…

VIEW QUESTION
Back To Top
Search