Jump to content

Clipboard!


PrateekSaxena

Recommended Posts

Hello,I want to access the clipboard of the computer. Like for example I have two testboxes on my HTML page, that are named "t1" and "t2" -

<input type="text" value="T1" name="t1" /><input type="text" value="T2" name="t2" />

Now what I want is that when someone clicks on a button then the stuf in the clipboard should be coopied in both the textboxes. But not that, let us say that the clipboard has the string "w3c Schools". Now before the stuff is actually copied I want it to be taken by the JavaScript and broken into two that is "w3c" and "school" and then be copied in t1 and t2. I want to be able to let the JS go though the string before it actually gets copied.How can I do that?? Please help!I mean is it even pobbsile to do that?

Link to comment
Share on other sites

Why not copy it into box 1 then fire an onChange() that splits the string into the second box?I showed a proof of concept of this months ago when someone asked for an emulation of the "licence key" boxes in software installations where you can paste in your key over multiple boxes.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...