Solved

Paste button in HTML?

Posted on 2003-10-22
3
222 Views
Last Modified: 2006-11-17
Is there a piece of simple code that allows a paste button on a web page to paste the contents of the clipboard into a text box on the page. Also while I'm asking, is there a way to have a copy and a cut button too?
If there is I will up the points to 150 for anyone who can direct me to somewhere with the code or provide me with the code.
Thanks
0
Comment
Question by:wjdashwood
  • 2
3 Comments
 

Author Comment

by:wjdashwood
ID: 9605490
No replies as yet, so I have increased the points for the answer and will increase them again to 350 to get the cade.
Thanks
0
 

Accepted Solution

by:
emmee earned 350 total points
ID: 9606034
Hi,

From your question, it looks as if you need something in javascript called document.execCommand("Copy"), document.execCommand("Paste"), document.execCommand("Cut")  They act  like the cut, paste, copy facilities you get in say MS Word, MS Excel.

What you need to do is create a form button in HTML and then create a javascript function which get's called when you click on the button.  Therefore, if you wanted a separate button for cut, copy and paste you would have three small functions with for each facility.  

For more information maybe you could search google for 'document.execCommand in javascript'

I hope this helps as I don't think I've answered your question fully.

Emmee




0
 

Author Comment

by:wjdashwood
ID: 9608091
This is apparently IE specific. Is there anything more general? Either javascript or otherwise.
That is what I am looking for though, just would prefer something that could work on all systems.
Thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
HTML5 save .Dat to server side 20 50
Change div area and length 1 34
CSS: How do I override in-line styling 11 25
Button function on table is in trouble 3 20
This article discusses how to create an extensible mechanism for linked drop downs.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question