javascript - Ajax return not show on page source Codeigniter -


i have problem ajax return values. returned data not showing on page's source code.

this controller code in codeigniter:

public function get_rooms(){     $rooms_selected = $this->input->get('q', true);     $this->load->model('roomreservation_model');     $room_numbers = $this->roomreservation_model->numberofroom($rooms_selected);     echo '<select class="form-control" name="room_number" id="room_number">';      foreach ($room_numbers $value) {         echo '<option value="'.$value->room_number.'">'.$value->room_number.'</option>';     }     echo '</select>'; } 

html code

<div class="col-lg-12">     <h2 class="sub-header">room detail</h2>     <div class="col-lg-6 col-xs-12 form-label">         <label for="room type">room type</label>         <select class="form-control" name="roomtype" id="roomtype" onchange="showuser(this.value)">             <option value="">select room type</option>             <option value="king suit">king suit</option>             <option value="suit one">suit one</option>             <option value="suit two">suit two</option>             <option value="suit three">suit three</option>         </select>     </div>     <div class="col-lg-6 col-xs-12 form-label">         <label for="room type">room avaiable</label>         <div id="txthint">             <b style="color:#6e6e6e">select room type show avaiable rooms</b>         </div>     </div> </div> 

when select room type (from select dropdown), ajax request made returns rooms available. works fin, problem when check browser's source code. not show source of available rooms.


Comments