Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Closing a pop up window of Excel on cancel.

 
Rahul Babbar
Ranch Hand
Posts: 210
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am a bunny in Javascript and i am having an issue here which i dont have any idea.

In the code, this javascript function is written which opens up an excel sheet.


Now when the excel opens up in the browser, a small browser window2 opens(without any data) and another popup comes, which asks the user whether you want to save or open or cancel.
if we select Open, the data is populated in the window2 in the form of excel.
However, if we select 'save' or 'Cancel', the popup closes but the browser window2 remains open.
My requirement is to close the window2 excel sheet when Save or Cancel is clicked.

Any ideas?
Thanks
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not think there is anything you can do about it because the browser is handing off the operation to excel and Escel does what it wants to do.

You might be better off setting the window.location.href to the file and see how the other browsers handle it.

Eric
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do not open a new window. Just use a plain vanilla link to the servlet and set the content disposition to 'attachment' in the servlet.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic