Click to See Complete Forum and Search --> : Open or save as window?
Hypercite
01-10-2004, 10:25 AM
How do i make an image into a link that opens one of those windows that ask if you want to open directly or save as.
So i when you press the image a window will pop up and ask if you want to opne or save as.
And the file that you open or save as will be a word file.
In general, javascript cannot communicate with user's local system ... for security reasons.
The only exception I know about is the form upload element which allows a user to upload a file to the server. Work then has to be done by the server to process the file correctly (cgi script or equivalent).
If you want the user to be able to save an image to their local file, just tell them to use their context menu (right-click the image in windows ... think it's the same fo other platforms).
Hypercite
01-11-2004, 03:55 AM
i dindt understand
how will i do this?
Just right-click an image on any web page. The 'context-menu' will appear ... and one of the options is to save the image you clicked.
WARNING!!
I'm very wary of clicking things that I don't know about on the web (I'm not paranoid ... I just don't like clicking adware). So, make sure you right-click, not left-click!!
Hypercite
01-11-2004, 06:59 AM
HEY!
You dont read to much detail do you?
I DONT WANT THE USERS TO SAVE THE IMAGE BUT I WANT THEM TO SAVE A WORD DOCUMENT.
so the klick the image and (dont sve the image) but they save the word document.
DO you get it?
HEY!
You want help!
If you want the user to be able to save an image to their local file, just tell them to use their context menu (right-click the image in windows ... think it's the same fo other platforms).
i dindt understand
how will i do this?
Explain yourself properly ... maybe you'll get some.
Hypercite
01-11-2004, 07:50 AM
Well the thing is i am a newbie and dont know to mush about this stuff.
And i know that you can just right clikck an image if you want to save it.
But this time the user is supposed to want the word document and not the image.
Therefore it is imposible (i think) to right click the image (if it is not linked to the word document) and download the word document.
And if im right then how do i link the image to the word document so that the users can download it?
cheers
ray326
01-11-2004, 02:54 PM
Just wrap the image in an anchor with an href pointing to the Word doc and their system will do the rest.