prompting to "save as" rather than opening images

R

Richard Hollenbeck

I have pages that I want a particular person to download dozens of images.
Instead of opening each image separately with right-clicks, I want to be
able to have them simply click, and the program will offer to save all the
images to a location they specify. Can I do that with JavaScript?
 
R

rf

Richard Hollenbeck said:
I have pages that I want a particular person to download dozens of images.
Instead of opening each image separately with right-clicks, I want to be
able to have them simply click, and the program will offer to save all the
images to a location they specify. Can I do that with JavaScript?

No. You can not affect the browsers settings. You may be able to trick the
browser into thinking they are a .exe by supplying an appropriate mime type.
This will often cause a download dialog to appear.

Why not throw the dozens of images into a single zip file.

Cheers
Richard.
 
M

mesal

Richard Hollenbeck said:
I have pages that I want a particular person to download dozens of images.
Instead of opening each image separately with right-clicks, I want to be
able to have them simply click, and the program will offer to save all the
images to a location they specify. Can I do that with JavaScript?

Hi Richard,

The only way I could think of is creating a zip file of all the images
and creating a link to the zip file.

Hope it helps
mesal
 
R

Richard Hollenbeck

Thank you both. I think that's a good idea too. However, my web space
provider, fortunecity.com, doesn't allow zip files. I'll try putting in my
Verizon personal web space to see if that will work.
 
M

Michael Winter

I have pages that I want a particular person to download dozens of
images.
Instead of opening each image separately with right-clicks, I want to be
able to have them simply click, and the program will offer to save all
the
images to a location they specify. Can I do that with JavaScript?

The only way I know of that can do this is by specifying the content type
to be application/octet-stream. However, this can only be done through a
HTTP header that is set server-side (with PHP, and the like). I tried to
see if the content type hint (the type attribute in A elements) can
produce the same effect, but Opera certainly ignores it (it is only
supposed to be a hint, after all).

Mike
 
R

rf

Thank you both. I think that's a good idea too. However, my web space
provider, fortunecity.com, doesn't allow zip files.

Then it is time to find a new host.

Cheers
Richard.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top