This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Servlets and the fly likes savedialogbox in javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "savedialogbox in javascript" Watch "savedialogbox in javascript" New topic
Author

savedialogbox in javascript

Mohammed Javeed Basha
Greenhorn

Joined: May 22, 2012
Posts: 9
Hi Good Morning,

I want savedialog box on clicking a button in jsp page or html page,
the user would like to have a "saveas" dialog box to show up. I need to do this in javascript.


Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61451
    
  67

Mohammed Javeed Basha wrote:I want savedialog box on clicking a button in jsp page or html page,

Simply create a link tot he file to be downloaded.

I need to do this in javascript.

No you don't. JavaScript has no access to the file systems.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Arun Giridhar
Ranch Hand

Joined: Mar 10, 2012
Posts: 147

you can call confirm("sometext"); use it's return value to do some operation (you can call your webservice )


hate Professionalism . Join the http://2014.hack.lu/index.php/Main_Page
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61451
    
  67

Arun Giridhar wrote:you can call confirm("sometext"); use it's return value to do some operation (you can call your webservice ) .

This has nothing whatsoever to do with the question. the confirm() method does not initiate any sort of file saving dialog.
 
Consider Paul's rocket mass heater.
 
subject: savedialogbox in javascript