views:

526

answers:

3

Is there a way at all of altering the clipboard of the user via Javascript? I want it that they click a given point on a map and it adds the coordinates of the position to their clipboard.

I do however assume that this is not possible for Javascript to achieve.

+1  A: 

If I remember correctly it is possible in the Internet Explorer (maybe the site must be in the "trusted" zone) but not in Firefox or Opera.

Martin
+2  A: 

It is in IE but not in other browser although support can be hacked together in other browsers by inserting a flash file each time you want to do a copy. Not very useful i would say, as it imposes usability drawbacks as well

Martijn Laarman
It's not possible anymore in flash10, as it's a major security flow.
MatthieuP
+8  A: 

You could try using the zeroclipboard library, which involves placing an invisible flash element on the page to do the actual copy of text to the clipboard.

rejj
This project is very nice. Thanks for sharing =)
Tiago
Thanks for the link.
Andrew Song