• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Cannot get Netscape 6.1 to open save as dialog box  RSS feed

Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a html file having a URL saying 'click here to download the date file'. When the URL is clicked it calls a servlet and the user sees a save as dialog box. On clicking ok, the data file is saved in the user's computer.
I used the method:
in the doGet() so that the content will not be displayed by the browser, but the browser will be forced to popup the 'Save As' dialog box as it cannot display such content type.
<b>This runs fine in IE5 and Netscape 4 & Netscape 6.1.</b>
However the default filename that appears in the SaveAs dialog box's FileName textfield is the package name of the servlet. that's funny!! The user can ofcourse change the name if he wants to.
To specify a default file name 'testfile' in the FileName textfield, I added another line :
response.setHeader ("Content-Disposition","inline; filename=\"testfile\"");
This runs fine in IE5 & netscape 4, where the 'testfile' appears in the FileName TextField of the Save As Dialog box.
<B>However the Save As Dialog Box fails to appear in Netscape 6.1</b>.Only a message box pops up telling me that Netscape cannot open this file for me, so I have the option to save the file if I want to. When I click on the 'Save As' button, <b>nothing happens</b>. Why does nothing happens after that. The Save As dialog box is suppose to appear.
I would highly apprecaiate if anyone can give me a solution to this problem <b>quick</b>. Just Remember I am having this problem with Netscape 6.1, not with IE5 or Netscape 4.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!