title: How to refresh Bootstrap modal refresh before modal show
body: <p>I was tried to my project many modal but the one modal load the data. After close the modal then I load another modal. But can't load that modal data. That was loaded old modal data. How to solve this problem?</p>
  
  <p>this is my first load Jquery. this data worked properly.</p>
  
  <pre><code>function Viewfull(id) {
      $.post('php/owner_list_view_modal.php',{id:id}, function (data) {
          var html = table(data);
           $('.modal-body').html(html);
           $('#orumodal').modal('show');
      });
  }
  
  function table(val) {
      var obj = $.parseJSON(val);
  
          var html = '&lt;style&gt;tr:nth-child(odd){background-color: #f5f5f5;} thead&gt;tr{background-color: #ec971f; color: white;}&lt;/style&gt;';
              html += '&lt;table class="table table-bordered has-warning"&gt;';
                  html += '&lt;tbody&gt;';
                      html += '&lt;tr&gt;&lt;td&gt;Name&lt;/td&gt;&lt;td&gt;'+ obj.name +'&lt;/td&gt;&lt;/tr&gt;';
                      html += '&lt;tr&gt;&lt;td&gt;Email&lt;/td&gt;&lt;td&gt;'+ obj.emailid +'&lt;/td&gt;&lt;/tr&gt;';
                      html += '&lt;tr&gt;&lt;td&gt;Mobile&lt;/td&gt;&lt;td&gt;'+ obj.mobile +'&lt;/td&gt;&lt;/tr&gt;';
                      html += '&lt;tr&gt;&lt;td&gt;Address&lt;/td&gt;&lt;td&gt;'+ obj.address +'&lt;/td&gt;&lt;/tr&gt;';
                      html += '&lt;tr&gt;&lt;td&gt;Place&lt;/td&gt;&lt;td&gt;'+ obj.place +'&lt;/td&gt;&lt;/tr&gt;';
                      html += '&lt;tr&gt;&lt;td&gt;City&lt;/td&gt;&lt;td&gt;'+ obj.city +'&lt;/td&gt;&lt;/tr&gt;';
                      html += '&lt;tr&gt;&lt;td&gt;State&lt;/td&gt;&lt;td&gt;'+ obj.state +'&lt;/td&gt;&lt;/tr&gt;';
                      html += '&lt;tr&gt;&lt;td&gt;Pin&lt;/td&gt;&lt;td&gt;'+ obj.pin +'&lt;/td&gt;&lt;/tr&gt;';
                      html += '&lt;tr&gt;&lt;td&gt;Status&lt;/td&gt;&lt;td&gt;'+ obj.status +'&lt;/td&gt;&lt;/tr&gt;';
                  html += '&lt;/tbody&gt;';
        return html += '&lt;/table&gt;';
  }
  </code></pre>
  
  <p>This is my another modal when I clicked first modal data show then closed that modal. Then I click another modal I was shown first modal result:</p>
  
  <pre><code>&lt;div id="uploadimg" class="modal fade" role="dialog"&gt;
      &lt;div class="modal-dialog modal-md"&gt;
  
          &lt;!-- Modal content--&gt;
          &lt;div class="modal-content"&gt;
              &lt;div class="modal-header"&gt;
                  &lt;button type="button" class="close" data-dismiss="modal"&gt;&amp;times;&lt;/button&gt;
                  &lt;h4 class="modal-title"&gt;&lt;/h4&gt;
              &lt;/div&gt;
              &lt;div class="modal-body" id="uploadmsg"&gt;
                 &lt;div class="container"&gt;
                     &lt;div class="row well"&gt;
                         &lt;div class="col-md-offset-4 col-md-6"&gt;
                             &lt;form method="post" action="profile_image_save.php" enctype="multipart/form-data"&gt;
                                 &lt;div class="form-group"&gt;
                                     &lt;label&gt;Profile Image&lt;/label&gt;
                                     &lt;input type="file" id="profileimg" name="profileimg"&gt;
                                 &lt;/div&gt;
                                 &lt;div class="form-group"&gt;
                                     &lt;button class="btn btn-success btn-lg pull-right"&gt;Change&lt;/button&gt;
                                 &lt;/div&gt;
                             &lt;/form&gt;
                         &lt;/div&gt;
                     &lt;/div&gt;
                 &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="modal-footer"&gt;
                  &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>