Solved

How do I make a button that will automatically pop up the Save As dialog box ?

Posted on 2008-10-17
6
196 Views
Last Modified: 2012-05-05
How do I make a button that will automatically pop up the Save As dialog box using HTML tag? so the user canbrowse through his local drvie, and eneter the filename to save.

any help is greatly appreciated!
0
Comment
Question by:AnnieDing
  • 2
6 Comments
 
LVL 44

Accepted Solution

by:
scrathcyboy earned 63 total points
ID: 22745678
Which files are saved to the hard drive depends on the file extension in windows.  Every user is different and many browsers are setup differently.  But if you NAME the file extension .ZIP or .PDF, or .XLS or .DOC or something that is USUALLY saved to the hard disk, you have the best chance of getting the SAVE AS dialog box.  Remember, this is user changeable, you cannot totally control it.  Find a file extension that prompts the SAVE AS dialog box on your browser, and use that -- ZIP is a good all-round choice.
0
 
LVL 54

Assisted Solution

by:b0lsc0tt
b0lsc0tt earned 62 total points
ID: 22746098
AnnieDing,
The browser is going to have issues with this.  If you don't mind sticking to IE as your browser then consider making this an HTA file instead.  The contents are similar but the extension of the file name is .hta instead of .htm or .html.  Also the browser's security is more permissive with hta files since they can only be locally run.
If you want this page to be on your web server and provide that type of page though you are out of luck, especially if this would be an Internet page.  The browser won't let Internet pages do it with html, javascript or any type of clientside script.  You could make an applet or ActiveX object to embed in the page to do this but that is not a simple thing to make.
Let me know if you have a question about this.
bol
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 22925633
I object to having this deleted, especially with a refund of points.  There was no response to the expert's posts.  With the information provided in the question both expert posts could be answers.  If they weren't enough then please respond and the experts can clarify or provide more information.  If you no longer need this question then you need to post to explain that and respond to the comments.
bol
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question