admin管理员组文章数量:1429061
I have two jsp pages. groups.jsp and addGroup.jsp
The addGroup JSP page is opened by clicking a button in groups.jsp and after clicking the "OK" button in addGroup.jsp, I'd like to refresh the groups.jsp. How will that be possible?
addGroup.jsp
<script type="text/javascript">
function refresh() {
//Refresh page implementation here
window.close();
}
</script>
//some code here
<table>
<tr>
<td>
<h:mandButton id="buttonOK" value="#{mon.ok}" type="button" styleClass="button" onclick="submitForm(); refresh();"/>
<td>
</tr>
</table>
//some code here
I have two jsp pages. groups.jsp and addGroup.jsp
The addGroup JSP page is opened by clicking a button in groups.jsp and after clicking the "OK" button in addGroup.jsp, I'd like to refresh the groups.jsp. How will that be possible?
addGroup.jsp
<script type="text/javascript">
function refresh() {
//Refresh page implementation here
window.close();
}
</script>
//some code here
<table>
<tr>
<td>
<h:mandButton id="buttonOK" value="#{mon.ok}" type="button" styleClass="button" onclick="submitForm(); refresh();"/>
<td>
</tr>
</table>
//some code here
Share
Improve this question
asked Mar 14, 2017 at 3:43
JuniorJunior
1475 silver badges14 bronze badges
1 Answer
Reset to default 4You can use window.opener
objRef = window.opener;
Returns a reference to the window that opened this current window.
Try this in your case:
<script type="text/javascript">
function refresh() {
//Refresh page implementation here
window.opener.location.reload();
window.close();
}
</script>
...
...
本文标签: javascriptHow to refresh a jsp page from another jsp pageStack Overflow
版权声明:本文标题:javascript - How to refresh a jsp page from another jsp page? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745503152a2661123.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论