Solved

"Save as" dialog box in HTML?

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now