title: how to reload Bootstrap 3 modal in javascript
body: <p>I have a Bootstrap Modal that confirm an action in the database by ajax call, i want to reload this modal after return success in ajax.</p>
  
  <p><strong>html:</strong></p>
  
  <pre><code>&lt;div class="modal fade" id="modal-4"&gt;
     &lt;div class="modal-dialog modal-sm"&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;h3 class="modal-title"&gt;Order Status&lt;/h3&gt;
              &lt;/div&gt;
              &lt;div class="modal-body"&gt; 
                 &lt;label class="ModalArrow"&gt;Order Number&lt;/label&gt;
                      &lt;select class="SelectStyle" style="width:95%;" name="OrderId" id="OrderId"&gt;
                          &lt;option value=""&gt;Select Order Number&lt;/option&gt;
                              &lt;!--populate value using php--&gt;
                              &lt;?php
                                   $stmt ="SELECT distinct Order_ID FROM orders where Delivered=0";
                                   foreach ($conn-&gt;query($stmt) as $row) {
                              ?&gt;
                              &lt;option value="&lt;?php echo $row['ID'];?&gt;"&gt;&lt;?php echo $row['Order_ID'];?&gt;&lt;/option&gt;
                              &lt;?php
                                  }
                              ?&gt;
                     &lt;/select&gt;
             &lt;/div&gt;
             &lt;div class="modal-footer"&gt;
                   &lt;button type="button" class="btn btn-success btn-md" style="margin:0;width: 100px;" onclick="ConfirmDelivery()"&gt;Delivered&lt;/button&gt;
                   &lt;button type="button" class="btn btn-secondary btn-md" data-dismiss="modal" style="font-weight: bold;"&gt;Cancel&lt;/button&gt;
             &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>Javascript:</strong></p>
  
  <pre><code>function ConfirmDelivery()
  {
    select=document.getElementById("OrderId");
    OrderId=select.options[select.selectedIndex].text;
  
  if (OrderId == "Select Order Number")
  {
      sweetAlert("","Please Choose Order Number","error");
      return false;
  }
  
  $.ajax({
      type:"POST",
      url:"ConfirmDelivery.php",
      data:"OrderID="+ OrderId ,
      success: function(data)
      {
          if (data == "Success")
          {
              sweetAlert("Order Number:" + OrderId + " has been delivered!");
              $('#modal-4').on('hidden', function() {
                  $(this).removeData('modal');
              });
          }
      }
  })
  }
  </code></pre>
  
  <p><strong><em>The problem is that the combo box is not reloaded</em></strong></p>