onClick paste

Here’s what I need. I need a paste button that does nothing but paste the text that I currently have copied into the clipboard on the computer (as in CTRL+V).

I have seen plenty of copy and paste scripts but I just need a paste script or line or function or what ever it might be. So far I havent seen anything that suits what I want. Please help!

Tried it and it works in IE6 and IE7. IE9 beta pops up a question:

Do you want to allow this webpage to access your Clipboard?

If you allow this, the webpage can access the Clipboard and read information that you’ve cut or copied recently.

[Allow access] [Don’t allow]

All in all, security breach much!? :nono:

Beware though; AFAIK clipboard manipulation is only available in Internet Explorer, not in any other browser.

Hmm, I see.
But I never copy/paste passwords, logins or credit card details or things like that.
If I put in those things, it’s from scratch.
I guess if you would see all my clipboard texts, it’s all rubbish :slight_smile:

So you could actually be able to make a malicious form like a guestbook. When clicking on the Send button to write into that guestbook, there can be a onbeforeclick thing that writes the available clipboardtext to a hidden formfield, so you can receive things the visitor has never meant to type and send?

Yikes! I’m really starting to wonder how many websites have got some info from my clipboard in the past. This is really rather scary. Good thing I have a password manager that clears my clipboard 10 seconds after I’ve copied it from the program so the chance that a website obtained one of my passwords is rather small, but still …

Zero Clipboard works in all browsers; another reason to surf with Flash disabled.

This tutorial shows you how to do it using js.