Archive for the 'SWFObject' Category

Extending Prototype – Copy to Clipboard

After some researching, I’ve extended the Form.Element.Methods with a copyToClipboard method. An example of usage: $('myinput').copyToClipboard();.

A few quick notes about the clipboard and browsers.

Natively in IE5+, you can gain access to the clipboard via the window.clipboardData object. If you wanted to gain access to the clipboard in Firefox, you have to enable security preferences in your user preferences. I couldn’t find a native solution for Opera or Safari. As a result of Firefox, Opera and Safari not having direct access to the clipboard, Flash presents us with an opportunity to gain access.

Read more on Extending Prototype – Copy to Clipboard…