Solved

Paste button in HTML?

Posted on 2003-10-22
3
221 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to get this page layout correct 13 31
Converting dates in JavaScript 2 36
Change Background Color of Website 5 19
Html Table Looping (part 2) 5 10
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
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…

822 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