aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Closing a pop up window of Excel on cancel. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Closing a pop up window of Excel on cancel." Watch "Closing a pop up window of Excel on cancel." New topic
Author

Closing a pop up window of Excel on cancel.

Rahul Babbar
Ranch Hand

Joined: Jun 28, 2008
Posts: 210
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


Rahul Babbar
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
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

Joined: Oct 08, 2006
Posts: 2458
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Closing a pop up window of Excel on cancel.
 
Similar Threads
JSP and Excel
Opening files in jsp
Excel Problem
Export to excel functionality
object doesn't support the property or method