This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Copy image to clipboard Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Copy image to clipboard" Watch "Copy image to clipboard" New topic

Copy image to clipboard

Valentin Crettaz
Gold Digger

Joined: Aug 26, 2001
Posts: 7610
Hi everybody,

Does Javascript provide some built-in support for copying an image embedded in an HTML page to the clipboard ?

I know IE's window.clipboardData.setData() function but it only allows to copy text and URLs... Is there some other trick for images ?

Thanks in advance

[Blog] [Blogroll] [My Reviews] My Linked In
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
I do not think it is possible, I could not find anything on it and I tried and got errors!

Valentin Crettaz
Gold Digger

Joined: Aug 26, 2001
Posts: 7610
Well, that's a pity! I'm just wondering why Microsoft implemented the Text and URL data transfers for the setClipboardData function and the Text, URL and Image data transfers only for the clear function.
Thanks anyway
It is sorta covered in the JavaRanch Style Guide.
subject: Copy image to clipboard
Similar Threads
copying JFrame into Clipboard - urgent
Urgent..Need some help...
Copying Images to the System Clipboard (Java 1.1.x)
Is there any way of getting an image from the system clipboard?
Java Image Capture, Buffered Image, Paste in MSWord 2007 problem