View Full Version : Download image through a text link

01-13-2004, 12:46 PM
Hi all,

I am attempting to create an image Library.

I have seen examples before where there is a thumbnail and next to it links to jpegs of different sizes/resolution and when these links are clicked a save dialogue box appears. I hope this makes sense.

I know I can create zips for each jpeg and this will create a save dialogue box when linked to, but this is not an option for me. I need it to link directly to the jpeg like on these other sites.

Does anyone know how I can do this?

many thanks


01-13-2004, 02:46 PM
IE accept something like (if I remember well)

document.execCommand('SaveAs') method... Never test it, You may find some references on the Net about it...

01-13-2004, 02:56 PM

01-13-2004, 03:22 PM
Hi thanks for this!

not sure if it's just me but it looks like you can only save the html page you are working on and not elements of it!? Is that right?

01-13-2004, 04:40 PM
obviousely... as you use document.method()...

So...try to build an object and fire this method upon him.

01-14-2004, 04:40 AM
You need to do it using a server-side language. Javascript can't do it. If you don't have access to any server-side language, you can just instruct the user to right-click the link and select 'Save Picture As...' option.