Jump to content

Copy To Clipboard Help - Probably easy fix...

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
Souluna

Souluna

    Newbie

  • Members
  • Pip
  • 1 posts
hey,
just need to know how to setup multiple copy to clipboards on one page that will work with firefox and IE.
<button type=button  class='clsGrayGradientTextButton' onclick="javascript:toClipboard(unescape('tester1'))" alt='Copy CLF Data'>Copy Data</button>

is what i have so far. i basically just need it to copy a defined set bit of txt.

when i click on any of the buttons, it does nothing.

cheers all

Edited by Jordan, 07 July 2009 - 04:16 AM.
Added code tags


#2
Guest_Jordan_*

Guest_Jordan_*
  • Guests
Moved to the correct forum. Also, please use code tags when posting code.

Where did toClipboard() come from? Is that a function you built? You need to use:

clipboardData.setData("text", s); 


in order to send to the clipboard.