Quick HTML/Javascript question...

Status
Not open for further replies.
no, I don't think so. not unless the user has their browser set to handle that particlar picture type with the application.

i.e. I don't think you can link to applications outside the browser on the client machine (unless it's a situation like, say, real media or windows media player, in which case the onus is on the client to install the appropriate software).

but, I could also be wrong. ;)
 

skylark

Ars Tribunus Militum
2,388
The only way I can think of is to make your picture a file to download. Then the browser's download dialog box will pop up and ask the user if he want to "save" or to "open" the file, and if he choose to open it it 'll be handled according to its file type by the associated app. But I don't think there is a way to make the browser skip the download dialog box, it would imply that you take control of the user's computer. The user may not like it very much.
 

skylark

Ars Tribunus Militum
2,388
You simply put the file's URL in the link's "href" attribute, for example : a href="myfile.bmp". In this example, after the user chose to "open in the current location" in the download dialog, the file will be opened by his .bmp file handler whatever it is.
You have to make sure to translate the file's actual path into a correct URL... I hope this is clear enough otherwise feel free to ask.

[This message was edited by skylark on February 23, 2002 at 13:11.]
 

pelican

Wise, Aged Ars Veteran
184
I don't think what you're looking for is possible. The only way to do that is to send them a weird up mime type that'll cause a download window to open (like this:)

Content-Type: application/octet-stream
Content-Disposition: attachment; filename=imagename.png
followed by the binary data

And then they can choose to open the download in an image editor.

I also think I'd really object if JavaScript from a webpage could open something on my local machine. Seems like it'd be a major security issue.

--pelican
 
Status
Not open for further replies.