title: How to show manipulated html using jquery in modal's bootstrap?
body: <p>This is my general modal's bootstrap :</p>
  
  <pre><code>&lt;div class="modal hide fade" id="myModal"&gt;
          &lt;div class="modal-header"&gt;
              &lt;button type="button" class="close" data-dismiss="modal"&gt;×&lt;/button&gt;
              &lt;h2&gt;Konfirmasi Perubahan Status Request&lt;/h2&gt;
          &lt;/div&gt;
  
          &lt;div class="modal-body"&gt;
              &lt;div class="controls" id="chekboxes"&gt;               
                  &lt;table&gt;
                      &lt;tbody&gt;
                          &lt;tr&gt;
                              &lt;td&gt;&lt;label class="control-label"&gt;Kind Of Complaint :&lt;/label&gt;&lt;/td&gt;
                              &lt;td&gt;
                                  &lt;div class="control-group"&gt;
                                      &lt;div class="controls" id="chekboxes"&gt;
                                          &lt;label class="checkbox inline"&gt;&lt;input type="checkbox" name="request[]" id="Login"    value="Login"     /&gt; Login &lt;/label&gt;
                                          &lt;label class="checkbox inline"&gt;&lt;input type="checkbox" name="request[]" id="Printer"  value="Printer"   /&gt; Printer &lt;/label&gt;
                                          &lt;label class="checkbox inline"&gt;&lt;input type="checkbox" name="request[]" id="Monitor"  value="Monitor"   /&gt; Monitor&lt;/label&gt;
                                          &lt;label class="checkbox inline"&gt;&lt;input type="checkbox" name="request[]" id="Computer" value="Computer"  /&gt; Computer&lt;/label&gt;
                                          &lt;label class="checkbox inline"&gt;&lt;input type="checkbox" name="request[]" id="Network"  value="Network"   /&gt; Network&lt;/label&gt;
                                          &lt;label class="checkbox inline"&gt;&lt;input type="checkbox" name="request[]" id="Other"    value="Lain-lain" /&gt; Other&lt;/label&gt; 
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
  
                          &lt;tr&gt;
                              &lt;td valign="top"&gt;&lt;label class="control-label"&gt;Description :&lt;/label&gt;&lt;/td&gt;
                              &lt;td&gt;&lt;div class="control-group "&gt;
                                      &lt;div class="controls"&gt;
                                          &lt;textarea class="cleditor" name="keluhan" id="modalkeluhan" rows="3"&gt;&lt;/textarea&gt;
                                      &lt;/div&gt;
                                  &lt;/div&gt;&lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/tbody&gt;
                  &lt;/table&gt;
              &lt;/div&gt;                    
          &lt;/div&gt;
  
          &lt;div class="modal-footer"&gt;
              &lt;a href="#" id="btn-footer" class="btn btn-danger"&gt;Ya&lt;/a&gt;
              &lt;a href="#" class="btn" data-dismiss="modal"&gt;Tidak&lt;/a&gt;   
          &lt;/div&gt;
  
      &lt;/div&gt; 
  </code></pre>
  
  <p>In this modal, I want to send some data using ajax. But why its not sent to modal? 
  I was checked the ajax in firebug, and it is success.
  This is the ajax :</p>
  
  <pre><code> $(".btn-info").click(function(e) {
       e.preventDefault();
       var $this = $(this);
       var idStr = $this.attr("req_id");
       var idText = idStr.split("/").pop();
       console.log(idText);
  
        $.ajax({
        url: '&lt;?php echo base_url() . 'control_closing/getDetailOfRequest/' ?&gt;',
        type: 'POST',
        data: {id: idText},
        dataType: 'json',
        success: function(obj) {
          console.log(obj); // output == &gt; Object { jenis_request="Login, Printer, Monitor", keluhan="Test"}
          console.log(obj.jenis_request); // output ==&gt; Login, Printer, Monitor
          console.log(obj.keluhan); // output ==&gt; Test
  
         var jr = obj.jenis_request.split(",")
  
         for (var j in jr) {
            $('input[type=checkbox][value=' + jr[j] + ']').prop('checked=checked', true);
         }
  
         $('#modalkeluhan').val(obj.keluhan);
         $('#myModal').modal('show');
         }
      });
  </code></pre>
  
  <p>How to show manipulated html using jquery in modal's bootstrap ?</p>
  
  <p>This is the html to executed this ajax :</p>
  
  <pre><code>&lt;td  class="center"&gt;
     &lt;a class="btn btn-info" id="btn-edit" name="edit" req_id="&lt;?php echo $data['kode_kantor'] . '/' . $data['kode_departement'] . '/' . date('m', strtotime($data['bulan'])) . '/' . $data['id_request']; ?&gt;"&gt;
        &lt;i class="halflings-icon white edit"&gt;&lt;/i&gt;
      &lt;/a&gt;
  
      &lt;a class="btn btn-success" &gt;
         &lt;i class="halflings-icon white print" id="print"&gt;&lt;/i&gt;
      &lt;/a&gt;         
   &lt;/td&gt;
  </code></pre>