Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New to javascript / multi copy to clipboard on same page

Status
Not open for further replies.

dvfcode

Technical User
Feb 17, 2011
1
0
0
US
Ok I know I need to set a value to each one of my corresponding copy to clipboard items but I am looking for the starting information on how to do this.

I am using a generic copy to clipboard function. What do I do to build my 12 options into this so when I click the corresponding copy note button it sends that note to the clipboard.

function ClipBoard()
{
holdtext.innerText = copytext.innerText;
Copied = holdtext.createTextRange();
Copied.execCommand("Copy");
}
 
You do realise that your code will only work with Internet Explorer as only IE will allow javascript to place items on the users clipboard.


Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top