Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating "Save As" Dialog Box

Status
Not open for further replies.

SvetsXpreS

Technical User
May 31, 2007
9
0
0
US
I am building an image gallery and I want people to click on the image and to have a "save as" window pop up to allow them to save the image. How would I go about doing that?

thanks!!!
 
You can't really. Browsers will create a Save as dialog box on their own when they receive a file type that they don't know what to do with.

If you want them to save the image instead of displaying inside the browser, you can zip the image, and then deliver that as a link.

For example:

Code:
<a href="imagefile.zip"><img src="imagefile.jpg"></a>

This will create an image, that can be clicked. when it is clicked, the browser will get the zip file, and automatically by itself offer the option to save it.

However if you were to change the link ref. from imagefile.zip to imagefile.jpg. the browser will just open it up, without offering the Save as option, because it knows what the type is and what to do with it.








----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top