Refreshing parent JSP window on submitting child jsp window.
843785Aug 22 2008 — edited Aug 23 2008Hi All,
I want to know hot can I refresh parent JSP window on submitting the child JSP window.
Below is the scenario:
I have two JSP window one is parent window other is child window. On clicking on a hyperlink in parent window the child pop-up window opens .
For opening pop-up window there is a java script method. inside the method i am calling window.open().
After doing some operation in pop-up window once I submit it I want the pop-up to be closed and parent window to be refreshed.
Below are few lines of code I am using for parent and child window
function {color:#993366}*popupColumnHeader()*{color}{color:#000000}{ {color}{color:#0000ff}// This script is at parent jsp page
{color}
var uri = "<%=request.getAttribute("URI")%>";
var path ="<%=WACommonServices.getCSPath()%>/ps/multiplesort?"+uri;
window.open(path,'ABC','location=yes,toolbar=no,menubar=no,scrollbars=no');
}
{color:#3366ff}// Below is to create a hyperlink where I need to click for getting pop-up{color}
<td class="accttblhdr" colspan="22" align="left">Testing - Open <b><a href="javascript:void(0); onclick="javascript:{color:#993366popupColumnHeader();{color}">Multiple Sort</a></b></td>
{color:#3366ff}// Below code is to close the popup and send some data with query string to action class .{color}
function {color:#993366}*submitMultipleSortForm()*{color} {
var value = sortCol1+" "+sortType1+","+sortCol2+" "+sortType2+","+sortCol3+" "+sortType3;
document.multiplesort.sortvalue.value = value;
var searchPageUrl = "<%=request.getQueryString()%>";
window.document.multiplesort.action = "<%=servletPath%>"+ searchPageUrl +"?"+ document.multiplesort.sortvalue.value;
window.document.multiplesort.submit();
parent.refresh(); {color:#3366ff}// When I do this the child window get refreshed with what I want in parent window.{color}
window.self.close();
}
{color:#3366ff}/// Below code from where I am calling method on submitting{color}
<TR><td align="center" width="176"><A href="javascript:submitMultipleSortForm();"><img border="0" cache src="/wa/lb/img/submit.gif"></A></td></TR>
Can anyone help me out in getting this resolved. Your brillient suggestion will be highly appreciated.
Thanks a lot!!