Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

closing popup window after reference to jsp which's contentType is"application/excel?

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello I m programming a frontend based on struts framework. The application flows as follows
INPUT JSP -> OUTPUT JSP -> clik export button -> back to INPUT JSP and refence to another JSP with contentType="application/excel-csv" so user can export result list displayed on OUTPUT JSP as an excel file.
here is INPUT JSP snippet where the referencing happens to export as excel file. BUT THE PROBLEM I FACE IS TO CLOSE THE popup window after referencing to that page.
################## snippet START ####################################
.
.
.
<%
String csvExportString = outBean.getCsvExportString();
session.setAttribute("csvExportString", csvExportString);
%>
</logic resent>
<logic resent name="<%= IWPSConstants.OUTPUT_BEAN%>">
<logic resent name="<%=IWPSConstants.OUTPUT_BEAN%>" property="exceed" >
<logic:notEqual name="<%=IWPSConstants.OUTPUT_BEAN%>" property="exceed" value="yes">
<logic resent name="<%=IWPSConstants.OUTPUT_BEAN%>" property="csvExportString">
<logic:notEqual name="<%= IWPSConstants.OUTPUT_BEAN %>" property="csvExportString" value="">
<script language="JavaScript" type="text/javascript">
<!--
win = window.open ("jsp/acCsvExport.jsp", "exportWin", "screenX=600,screenY=700,width=10,height=10,toolbar=no,status=no,scrollbars=no,menubar=no,resizable=no");
win.focus();
//exportWin.close();
//win.close("about:blank")
// -->
</script>
</logic:notEqual>
</logic resent>
</logic:notEqual>
</logic resent>
</logic resent>
.
.
.
################## snippet END ###################################
I used also the js function close(). WHich does the closing but also closed the dialog window for opening or saving the excel file which i reference.
Is there any solution ways I also used the class Robot from awt package but was also unsuccesfull. What i want is close only the popup window and still have available dialog window.
I appreciate your feedback
happy day
Or´┐Żun
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64613
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Controlling popup windows is a pure client-side activity, so I'm remanding this to the HTML/Javascript forum.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the save dialog is on the child window then it will close.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic