SoulEyes Photography
*SoulEyes Photography>>>Photo Gallery

Download Save As Prompt Javascript?



I'm doing a photo gallery for IT noobs. Most IT noobs dont even know how to right click and Save As an image file. So I'm looking for a script that onclick a link, it popup a Save As box and will save that image or any file which we have set it to.

Anyone seen this code before? Can redirect me to it?

You don鈥檛 need JavaScript for this (nor do I think it is possible) 鈥?the 鈥淐ontent-Disposition鈥?HTTP header is an extension to the MIME protocol designed precisely for this purpose.

The link you provide to download the image should serve the image, along with a HTTP header like:

Content-Disposition: attachment; filename=foo.jpg

Note that the optional 鈥渇ilename鈥?parameter is a handy way of suggesting a filename for your user to save as.

Doing the above should cause the standard 鈥淪ave as鈥︹€?dialogue box to open that your users will be familiar with.


Best wishes,
Dave Cardwell.
http://davecardwell.co.uk/javascript/... Source(s): The RFC that originally discussed Content-Disposition:
http://www.ietf.org/rfc/rfc1806.txt...
haven't seen it, why not just put a button under whatever it is, and call it download. oh and i never heard of a tech not knowing to right click and save as, seeings how most techs right click on alot of things to see properties or to edit something.
Tags
Photography School Photography Magazine Photography Jobs Photography Equipment Photography Courses Photo Gallery Photo Essays Art Gallery Wedding Photography Stock Photography
Related information
  • Want sceensaver of Nick man of the year?
  • Every little bit helps, right?? Town by town, and state by state, we WILL rid ourselves of illegals!?
  • I need you opinions?
  • Why are pictures not displaying on my ipod?
  • How to create a pop-up autosized around a jpg?
  • HPT i am pulling my hair out with the dam things...........?
  • Need Help Identifying Depression Glass?
  • Is Great Khali is the one of the greatest Sportsman in the history of India ???
  •  

    Photography Categories--Copyright/IP Policy--Contact Webmaster