Solved

"Save as" dialog box in HTML?

Posted on 2000-04-20
4
386 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to make footer stick to bottom 9 31
One field not displaying content (ASP Classic) 8 26
key press alert 2 19
html Uncheck Checkbox 2 11
Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

810 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