Solved

"Save as" dialog box in HTML?

Posted on 2000-04-20
4
388 Views
Last Modified: 2010-05-18
How can we get a "save as" dialog box in HTML?Is there any option as the <input type=file> that gives the "open" dialog box?
0
Comment
Question by:aparnapr
4 Comments
 
LVL 1

Expert Comment

by:red117
ID: 2735493
i dont know of a way to get it, but you can always zip all of your files up, and by doing so you will get that box.  if it is opening the files it is because that it is a text, or you have an acrobat plugin or something of the like.  
0
 

Author Comment

by:aparnapr
ID: 2735585
I have a form and I want to have a "save as" option given to the user...and would like to know how I can get this done.
0
 
LVL 7

Expert Comment

by:nettrom
ID: 2736301
What do you want to accomplish with the "Save as" option?  Is it the result of the form you want to save, or?
0
 
LVL 2

Accepted Solution

by:
venkat2000120699 earned 50 total points
ID: 2737089
Try this code: but don't forget to place temp.zip and temp.exe files in the folder in which this HTML file is placed.

When u click on the button or link, u will get a dialog asking for opening/saving the file.  choose save it to disk and press ok.  u will get the save as dialog box.  then save the file whereever u want.

<html>
    <body>
        <form>
            <a href="temp.zip">Download a zip file</a>
            <a href="temp.exe">Download a exe file</a>
            <input type=submit value="Click here to download a zip file"

onclick=window.open("temp.zip")>
        </form>
    </body>
</html>
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
convert Systemjs to Webpack 3 71
Search Item in Table 2 43
Does anyone know how I can make this header sticky on this theme and keep it responsive 15 49
Date on a table 16 33
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
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 …

679 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