wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes force download of page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "force download of page" Watch "force download of page" New topic
Author

force download of page

a chandra
Greenhorn

Joined: Apr 22, 2001
Posts: 3
I want the user to be made to download a .txt file if he click on the download button. But, both netscape and ie open the page in the browser iwndow without giving the user an option to download the file.
Can I force the browser to pop up the save as option instead of opening the page in the browser.
Thanks
Amit
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4339
    
    2

a chandra,
one way to do that would be to change the extention from .txt to something else(.text maybe?). the only problem with that approach is that the user might not realize it is really a .txt file. there might be a better way but I dont know of it.
I hate to say this but, your name does not comply with the Javaranch naming guidelines which can be found at http://www.javaranch.com/name.jsp
please register again with a valid name.
[This message has been edited by Randall Twede (edited July 07, 2001).]


SCJP
Visit my download page
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: force download of page
 
Similar Threads
DownLoading a PDF File
Save /Open option for file download
question about downloading
Big binary file interactive downloading
How to force download of a link in a jsp page ?