title: Can't get bootstrap modal show on submit
body: <p>I tried using the following code to show a modal pop up after the user enter data and click on a button on existing modal pop up.  Can anyone point out what I did wrong.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
      &lt;head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
          &lt;title&gt;Untitled Document&lt;/title&gt;
          &lt;link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Aguafina+Script"&gt;
          &lt;link rel="stylesheet" type="text/css" href="css/bootstrap.css"&gt;
          &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"&gt;
          &lt;link rel="stylesheet" type="text/css" href="css/theme.css"&gt;
    &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"&gt;
          &lt;link href="//netdna.bootstrapcdn.com/font-awesome/3.1.1/css/font-awesome.css" rel="stylesheet"&gt;
          &lt;link href="//cdn.rawgit.com/Eonasdan/bootstrap-datetimepicker/e8bddc60e73c1ec2475f827be36e1957af72e2ea/build/css/bootstrap-datetimepicker.css" rel="stylesheet"&gt;
  
          &lt;script src="http://code.jquery.com/jquery-1.9.1.min.js"&gt;&lt;/script&gt;
    &lt;script src="js/bootstrap.min.js"&gt;&lt;/script&gt; 
         &lt;script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment-with-locales.js"&gt;&lt;/script&gt;
    &lt;script src="//cdn.rawgit.com/Eonasdan/bootstrap-datetimepicker/e8bddc60e73c1ec2475f827be36e1957af72e2ea/src/js/bootstrap-datetimepicker.js"&gt;&lt;/script&gt;
          &lt;script src="//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.2.8/jquery.form-validator.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;a href="#" data-toggle="modal" data-target="#AddPkgPrompt"&gt;&lt;i class="fa fa-cube fa-4x"&gt;&lt;/i&gt;&lt;h2&gt;Add Package&lt;/h2&gt;&lt;/a&gt;
  &lt;div class="modal fade" id="AddPkgPrompt" tabindex="-1" role="dialog" aria-labelledby="AddPkgPromptLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false"&gt;
   &lt;div class="modal-dialog"&gt;
       &lt;div class="modal-content"&gt;
           &lt;div class="modal-header"&gt;
               &lt;button type="button" class="close" data-dismiss="modal"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;span class="sr-only"&gt;Close&lt;/span&gt;&lt;/button&gt;
                  &lt;h2 class="modal-title text-center" id="AddPkgPromptLabel"&gt;Add Package&lt;/h2&gt;
              &lt;/div&gt;
              &lt;form action="" method="post" enctype="multipart/form-data" class="form-horizontal" id="frmAddPkg"&gt;
               &lt;div class="modal-body"&gt; 
                      &lt;div class="form-group"&gt;
                       &lt;div class="col-sm-12"&gt;
                  &lt;div id="opnshp"&gt;
                                  &lt;input type="radio" id="1" name="rbshp" value="1" required /&gt;&lt;label&gt;1&lt;/label&gt;
                                  &lt;input type="radio" id="2" name="rbshp" value="2" required /&gt;&lt;label&gt;2&lt;/label&gt;
                     &lt;/div&gt;
                       &lt;/div&gt;
         &lt;/div&gt;
                  &lt;/div&gt;              
               &lt;div class="modal-footer"&gt;
                &lt;div class="col-sm-offset-4 col-sm-8"&gt;
                       &lt;button name="btnAddPkg" id="btnAddPkg" type="submit" class="clsAddPkg btn btn-primary"&gt;&lt;i class="fa fa-plus-circle"&gt;&lt;/i&gt;&amp;nbsp;Create&lt;/button&gt;
                &lt;/div&gt;
               &lt;/div&gt;
              &lt;/form&gt;
           &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="modal fade" id="RrsultModal" tabindex="-1" role="dialog" aria-labelledby="ResultModal" aria-hidden="true" data-backdrop="static" data-keyboard="false"&gt;
   &lt;div class="modal-dialog"&gt;
       &lt;div class="modal-content"&gt;
           &lt;div class="modal-header"&gt;
               &lt;button type="button" class="close" data-dismiss="modal"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;span class="sr-only"&gt;Close&lt;/span&gt;&lt;/button&gt;
                  &lt;h2 class="modal-title text-center" id="ResultModal"&gt;xx&lt;/h2&gt;
              &lt;/div&gt;
              &lt;div class="ct_schpkgresult"&gt;&lt;/div&gt;
           &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;script&gt;
  $("#frmAddPkg").submit(function(e) {
    var shpid = get_radio_value();
    var dataString = '&amp;shpid=' + shpid; 
     $.ajax({
            type: "GET",
            url: "t2.php",
               data: dataString,
      async: false,
               cache: false,
               success: function (data) {
                console.log(data);
        $('#LookupModal').modal('show'); /*TMP*/
       /*$('#AddPkgPrompt').modal('hide');*/
       /*window.location.replace("index.php");*/
               },
               error: function(err) {
                console.log(err);
               }
        });
   });
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>User selects one of the radio buttons on existing form "frmAddPkg" and click on a button which triggers ajax call to t2.php.  The t2.php does it job correctly.  I just want to add the line <code>$('#ResultModal').modal('show')</code> to display the result but nothing shown after existing modal vanished.</p>