wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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: 15376
    
    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: 15376
    
    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
 
 
subject: Saveas dialog with Javascript
 
Similar Threads
closing popup window after reference to jsp which's contentType is"application/excel?
file chooser
how can i open save file dialog box in firefox?
Dialog Box Refresh Problem
How to open a file dialog box (open, save as, new)