SHARE
TWEET

Untitled

a guest Jun 25th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public function add_quote(){
  2.  
  3.             $this->load->model('client_model');
  4.         $query = $this->input->get('query');
  5.         $this->db->like('name', $query);
  6.  
  7.  
  8.         $data = $this->db->get("tags")->result();
  9.  
  10.  
  11.         echo json_encode( $data);
  12.  
  13.  
  14.  
  15.     }
  16.      
  17. <div class="container" style="width: 50%; float: left;">
  18.         <div class="row">
  19.          <div class="col-md-7">
  20.     <h1>Add quote</h1>
  21.     <input class="typeahead form-control" type="text">
  22.          </div>
  23.  
  24.     </div>
  25.         </div>
  26. </div>
  27.  
  28.  
  29. <script type="text/javascript">
  30.     $('input.typeahead').typeahead({
  31.         source:  function (query, process) {
  32.         return $.get('welcome/add_quote', { query: query }, function (data) {
  33.                 console.log(data);
  34.                 data = $.parseJSON(data);
  35.                 return process(data);
  36.             });
  37.         }
  38.     });
  39. </script>
  40.      
  41. <div id="drawings" class="tab-pane fade">
  42.      <h4>       </h4>
  43.       <?php include 'picture_list.php'?>
  44.  
  45.       </div>
  46.     <div id="documents" class="tab-pane fade">
  47.       <h4>       </h4>
  48.      <?php include 'documents_list.php';?>
  49.     </div>
  50.     <div id="quote" class="tab-pane fade">
  51.       <h4>Quote</h4>
  52.    <?php      include 'add_quote.php';?>
  53.     </div>
  54.   </div>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top