This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Close browser window

 
Rakesh Gadre
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using a jsp file to open an excel file by using the following Syntax:

<%
String fileName = (String)session.getAttribute("fileName");
%>
<html>
<meta http-equiv="refresh" content="0;URL=<%=fileName%>">
</html>

This code opens up a dialog box that prompts user to OPEN/SAVE the file.

Now, my requirement is that if user saves the file, I want to close the browser window automatically... if he opens it, nothing should happen..

Thanks in advance
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To do that you'd have to change some setting in the client OS most probably. It certainly can't be done with any code in the JSP, and I don't think it can be done with JavaScript either. I don't think its worth the effort trying this - I'd go argue the requirement with who ever set it.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic