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.
Thanks in advance, Arun
In main.jsp,
<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;">Pop-up Window</a>
In pop-up jsp
<script type="text/javascript">
function checkForm(){
window.close();
target="main"
return true;
}
</script>
<body>
<form action="selectAction.action" onsubmit="return checkForm(this)">
<s:select name="mylist" list="%{mylist}"></s:select>
<s:submit ></s:submit>
</form>