View Full Version : Quick Copy

07-15-2011, 04:17 AM
Don't even know where to post this as I have never thought about it;

I've just made my game have a image upload script in, and a album showing the users images. How could I make have a link saying "Copy Link" that if clicked will copy the picture url to clip board.

I've seen places like w3schools use in but not as tuts though.

Please this will really help, desplayin the link is ugly


I've found the following code but I don't understand how I turn it into a link or button.

window.clipboardData.setData('text','This has been copied to your clipboard.');

07-15-2011, 05:09 AM
This hasn't a thing to do with PHP. If you have a known url you are copying, the only way to do it is with a client technology.
Moving from PHP to Javascript forum.

rnd me
07-15-2011, 09:36 PM
just present the image, all browsers have a save image functionality available in their right-click menu...

or you can mess with 3-4 solutions to handle all the different browsers, and still only save the user a single click, all the while risking security popup warnings...