/    Sign up×
Community /Pin to ProfileBookmark

Open or save as window?

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.

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@pnajJan 10.2004 — 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).
Copy linkTweet thisAlerts:
@HyperciteauthorJan 11.2004 — i dindt understand

how will i do this?
Copy linkTweet thisAlerts:
@pnajJan 11.2004 — 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!!
Copy linkTweet thisAlerts:
@HyperciteauthorJan 11.2004 — 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?
Copy linkTweet thisAlerts:
@pnajJan 11.2004 — 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).[/QUOTE]

i dindt understand

how will i do this?[/QUOTE]


Explain yourself properly ... maybe you'll get some.
Copy linkTweet thisAlerts:
@HyperciteauthorJan 11.2004 — 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
Copy linkTweet thisAlerts:
@ray326Jan 11.2004 — Just wrap the image in an anchor with an href pointing to the Word doc and their system will do the rest.
×

Success!

Help @Hypercite spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...