This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Saveas dialog with Javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Saveas dialog with Javascript" Watch "Saveas dialog with Javascript" New topic
Author

Saveas dialog with Javascript

Vijay Vaddem
Ranch Hand

Joined: Feb 13, 2004
Posts: 243
Hi,
I would like to invoke "Save As" dialog window using Javascript. This should
make the user to save the current page. Im able to do this for IE, however,
Im unable to find a solution for mozilla and netscape.
Can anyone help, pls....
Vijay
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15385
    
    6
I think you are not going to be able to do it with any of the other browsers.
Vijay Vaddem
Ranch Hand

Joined: Feb 13, 2004
Posts: 243

Is there any workaround for this??
Eric, please look into this........
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15385
    
    6
Best thing you can do...
if(!document.all)alert("Please use 'File Save As' from the file menu in the toolbar\n\nThank you");
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
Vijay,
The JavaScript security model precludes webpages from arbitrarily doing this sort of thing. (Be thankful!)


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
 
Have you checked out Aspose?
 
subject: Saveas dialog with Javascript
 
jQuery in Action, 3rd edition