• 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

Closing a pop up window of Excel on cancel.

 
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic