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
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: 4340
    
    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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: force download of page