473,796 Members | 2,669 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

prompting to "save as" rather than opening images

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?
Jul 20 '05 #1
5 1545
rf

"Richard Hollenbeck" <ri************ ****@verizon.ne t> wrote in message
news:GR******** *********@nwrdd c01.gnilink.net ...
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.
Jul 20 '05 #2
"Richard Hollenbeck" <ri************ ****@verizon.ne t> wrote in message news:<GR******* **********@nwrd dc01.gnilink.ne t>...
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
Jul 20 '05 #3
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.

"mesal" <me**********@y ahoo.com> wrote in message
news:eb******** *************** **@posting.goog le.com...
"Richard Hollenbeck" <ri************ ****@verizon.ne t> wrote in message

news:<GR******* **********@nwrd dc01.gnilink.ne t>...
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

Jul 20 '05 #4
On Mon, 12 Jan 2004 00:27:18 GMT, Richard Hollenbeck
<ri************ ****@verizon.ne t> wrote:
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

--
Michael Winter
M.******@blueyo nder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 20 '05 #5
rf

"Richard Hollenbeck" <ri************ ****@verizon.ne t> wrote in message
news:t4******** **********@nwrd dc01.gnilink.ne t...
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.
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
20694
by: Richie | last post by:
What I want is to have a link to a file (it could be a .zip, .exe, .jpg, ..txt or even .html) and when the user clicks on it they are prompted with the Save As box, as opposed to it opening in the browser. I think I need to do something like: $fp = fopen($filetooutput, "rb"); $thefile = fread($fp, filesize($thefiletooutput)); header("Content-type: ???/???"); not sure what to put instead of the ??? echo $thefile;
4
16359
by: Dariusz | last post by:
I have the following code which executes successfully to call the browsers "save as" box... //Screensavers if ($FileType == 'scr') { // We'll be outputting a screensaver header('Content-type: application/octet-stream'); // It will be called test.scr header('Content-Disposition: attachment; filename="test.scr"');
3
7932
by: lir | last post by:
Hi, I am trying to save a fram in a page using the execCommand("saveas") the html is save currectly but I can not save the gif on that page. How can I save the fram with the gif via execCommand("saveas"). I would like the user to choose where to put the file on his/her loca hard drive. Thanks, Liro - li
27
5092
by: Curious Angel | last post by:
I have a resume in PDF format and I want anyone who LEFT-OR-RIGHT clicks the link to force the file to be saved, and in any event _not_ opened. Since the PDF will be in his cache in any event, I would just as soon place the employer in control of what directory he wishes to save it in, and there are two salient reasons for this: 1. I want him to OWN the document 2. I want him to FIND the document, quickly, on his hard drive In any...
3
2454
by: Skevmeister | last post by:
Hi Guys, Ok, so I have now figured out how to create and watermark and resize and resample images for my website, but now I want to trap the "save picture as" event so that I can create another image on the fly to stop people stealing my images. Does any one now how I can do this. TIAF Alixx --
6
1748
by: OriginalBrownster | last post by:
Hi there... I'm still pretty new to turbogears. but i have gotten pretty familiar with it i'm just trying to clear something up, i'm having a difficult time using \ when declaring a string expression such as tempname="\"..it says that the line is single qouted.
60
8028
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I prompt a "Save As" dialog for an accepted mime type? ----------------------------------------------------------------------- It is not possible with client-side JavaScript. Some browsers accept the Content-Disposition header, but this must be added by the server. Taking the form:- ` Content-Disposition: attachment; filename=filename.ext `
1
3892
by: sainathparuchuri | last post by:
As a project requirement we need to convert word documents to tiff images. We have been using Microsoft Office Document Image Writer (MODI) for this puspose and doing absolutely well. But now this process need to be automated. Whenever a document is converted to tiff MODI pops up a "Save as" dialog box which asks the path to save the converted tiff file. Now is there a way this "Save as" dialog box can be suppressed and all the files be...
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9525
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10221
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9050
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6785
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5569
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.