title: How to call an action in pop up window
body: <p>I have a JSP where i have a link to open pop-up window(lets say some action in struts xml). In that window, i have 4 dropdowns. Once users select these 4 dropdown and clicked the submit button, an action got called as mentioned in struts xml. ,corresponding mapped pages has to displayed as main and pop up window has to be closed. Any help/idea how to do this? I am new to programming. </p>
  
  <p>Thanks in advance,
  Arun</p>
  
  <p>In main.jsp,</p>
  
  <pre><code>&lt;a href="http://localhost:8080/hello.action" onclick="javascript:void window.open('http://localhost:8080/Strutslearning/hello.action','1379313271736','width=700,height=500,toolbar=0,menubar=1,location=0,status=1,scrollbars=1,resizable=1,left=0,top=0');return false;"&gt;Pop-up Window&lt;/a&gt;
  </code></pre>
  
  <p>In pop-up jsp</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
  
   function checkForm(){
       window.close();
       target="main"
       return true;
   }
  
   &lt;/script&gt;
  
  
  &lt;body&gt;
  &lt;form action="selectAction.action" onsubmit="return checkForm(this)"&gt;
  &lt;s:select name="mylist" list="%{mylist}"&gt;&lt;/s:select&gt;
  &lt;s:submit &gt;&lt;/s:submit&gt;
  
  &lt;/form&gt;
  </code></pre>