Solved

"Save as" dialog box in HTML?

Posted on 2000-04-20
4
389 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
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…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

734 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