Solved

Paste button in HTML?

Posted on 2003-10-22
3
218 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now