title: How to display a form on popup box, which will be on other jsp
body: <p>I have two jsp pages. On first page i am displaying some content and a <code>EditButton</code> on click of that button i have to display a form that will be coming from the second jsp.
  Can anyone please give me some example??
  my first jsp is here </p>
  
  <blockquote>
    <p>test1.jsp</p>
  </blockquote>
  
  <pre><code>&lt;%@ include file="/WEB-INF/includes/includes.jsp"%&gt;
  
  &lt;portlet:actionURL var="dependantModeActionUrl"&gt;
      &lt;portlet:param name="mode" value="dependantsMode"/&gt;
  &lt;/portlet:actionURL&gt;
  
  
  &lt;form:form id="dependentsModeForm" name="dependentsModeForm" modelAttribute="dependantsForm" method="post" action='&lt;%=renderResponse.encodeURL(dependantModeActionUrl.toString())%&gt;'&gt;
  
  &lt;div class="cta-group pull-right"&gt;
  &lt;div id="terms" style="display:none;"&gt;
     &lt;/div&gt;
           &lt;button type="submit" class="cta" name="add"&gt;Add&lt;/button&gt;
           &lt;button type="submit" class="cta" name="edit"&gt;Edit&lt;/button&gt;
           &lt;button type="submit" class="cta cta--primary" name="view"&gt;View&lt;/button&gt;
            &lt;button type="submit" id="remove" class="cta" name="remove" &gt;Remove&lt;/button&gt;
            &lt;!-- &lt;a id="remove" href="#" onclick="removeDependants()"&gt;Remove&lt;/a&gt; --&gt;
            &lt;!-- &lt;input type="button" class="cta" onclick="loadPage()" value="Remove"/&gt;
            &lt;div  id='modalbox'&gt;&lt;/div&gt; --&gt;
           &lt;!--  &lt;a  href="#" onclick="openMyDialog()" &gt;test&lt;/a&gt; --&gt;
  
  
     &lt;/div&gt; 
  &lt;/form:form&gt;
  &lt;script type="text/javascript"&gt;
  
  $(document).ready(function () {
      $(function () {
          $("#terms").dialog({
  
              autoOpen: false,
              modal: true,
              draggable:false,
              cache:true,
              resizable:false,
              width:'90%',
              title:'Remove Contact',
              buttons:[
                       {
                           text:'Remove',
                           class:'cta',
                           click:function(){
                               $(this).dialog('close');
                           }
                       }
  
                       ]
  
          });
      });
  });
  
  $("#remove").click(function (e) {
      e.preventDefault();
      $("#terms").dialog('open');
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>and on other side i have created a form on other </p>
  
  <blockquote>
    <p>test2.jsp</p>
  </blockquote>
  
  <p>.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Testtitle&gt;
  &lt;script src="js/jquery.min.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="/jquery_popup.css" /&gt;
  &lt;script src="/jquery_popup.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="mainform"&gt;
  
  &lt;div class="form" id="popup"&gt;
  &lt;p id="onclick"&gt;Popup&lt;/p&gt;
  &lt;br/&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;!--Contact Form --&gt;
  &lt;div id="contactdiv"&gt;
  &lt;form class="form" action="#" id="contact"&gt;
  &lt;img src="images/button_cancel.png" class="img" id="cancel"/&gt;
  &lt;h3&gt;Contact Form&lt;/h3&gt;
  &lt;hr/&gt;&lt;br/&gt;
  &lt;label&gt;Name: &lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
  &lt;br/&gt;
  &lt;input type="text" id="name" placeholder="Name"/&gt;&lt;br/&gt;
  &lt;br/&gt;
  &lt;label&gt;Email: &lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
  &lt;br/&gt;
  &lt;input type="text" id="email" placeholder="Email"/&gt;&lt;br/&gt;
  &lt;br/&gt;
  &lt;label&gt;Contact No: &lt;span&gt;*&lt;/span&gt;&lt;/label&gt;
  &lt;br/&gt;
  &lt;input type="text" id="contactno" placeholder="10 digit Mobile no."/&gt;&lt;br/&gt;
  &lt;br/&gt;
  &lt;label&gt;Message:&lt;/label&gt;
  &lt;br/&gt;
  &lt;textarea id="message" placeholder="Message......."&gt;&lt;/textarea&gt;&lt;br/&gt;
  &lt;br/&gt;
  &lt;input type="button" id="send" value="Send"/&gt;
  &lt;input type="button" id="cancel" value="Cancel"/&gt;
  &lt;br/&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Now, when i click on the delete button on </p>
  
  <blockquote>
    <p>test1.jsp
    i can see a popup is coming but i want to display the fields on pop-up that will come from 
    test2.jsp</p>
  </blockquote>