• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Close browser window

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic