title: how to pass data-target id to another jsp bootstrap
body: <p>I am currently facing an issue that I want to display the dialog box using bootstrap by clicking on the button. I made the dialog box in html (.jsp), and the submit button in another .jsp but, after I click on the button, it just displays blank page instead of the dialog box. </p>
  
  <p><b>SubmitForm.jsp</b></p>
  
  <pre><code>&lt;form id="cusPayment" name="cusPayment" method="post" action="CusConfirmPayment.jsp"&gt;
                  &lt;input id="accid" name="accid" type="hidden" value="&lt;%=accno%&gt;"&gt;
                  &lt;input id="statid" name="statid" type="hidden" value="&lt;%=ref%&gt;"&gt;
                  &lt;input id="amt" name="amt" type="hidden" value="&lt;%=amt%&gt;"&gt;
                  &lt;input id="lflag" name="lflag" type="hidden" value="E"&gt;
  
  
   &lt;/form&gt; 
  
  
  
              &lt;a data-toggle="modal" data-target="#loginModal" href="#" class="btn-green   pay-btn" id='paynow'&gt;Pay Bill Now&lt;i class="fa fa-chevron-right"&gt;&lt;/i&gt;&lt;/a&gt;
             &lt;div&gt;
      &lt;/div&gt;
  
  
  $(document).ready(function() {
   $(".paynow,#paynow").click(function(event){
              event.preventDefault();
               $("#cusPayment").submit();
   });
  </code></pre>
  
  <p><br>
  <b>CusConfirmPayment.jsp</b></p>
  
  <pre><code>    &lt;div class="modal fade pay-now" id="loginModal"  tabindex="-1" role="dialog" aria-hidden="true"&gt;
                  &lt;div class="modal-dialog modal-top"&gt;
                      &lt;div class="modal-content self-content"&gt;
                          &lt;div class="modal-header remove-border"&gt;
                              &lt;button type="button" class="close-btn" data-dismiss="modal"&gt;&amp;times;&lt;/button&gt;
                          &lt;/div&gt;
                          &lt;div class="modal-body popup-copy"&gt;
                              &lt;div class="col-sm-10 popup-title"&gt;Confirm Payment Amount&lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  </code></pre>