• 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

save as dialog problem

 
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am facing a problem related to save as dialog box.

i've written the below code in the jsp page mentioned in the window.open to open an xml file.

response.setContentType("text/xml;charset=UTF-16");
response.setHeader("Content-Disposition","attachment; filename=\""+Constants.ReportName.CUSTOMER_DRAWING_NUMS+"\"");

before opening the xml file, a save as dialog box is appearing. when i click on the save as dialog box, xml file is getting saved but the window is not getting closed automatically.

so, i changed the code by replacing attachment with inline as follows:

response.setContentType("text/xml;charset=UTF-16");
response.setHeader("Content-Disposition","inline; filename=\""+Constants.ReportName.CUSTOMER_DRAWING_NUMS+"\"");

now, save as dialog box is not coming and the xml page is opening.

Please let me know, how the save-as dialog box should come and on saving the popup should be closed.
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Despite the fact that the data you are transferring happens to be XML, this is not a question about XML at all. Let's move it to somewhere better.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't. The easiest solution is not to use a popup.
[ July 31, 2008: Message edited by: Bear Bibeault ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic