Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: RegisterClipboardFormat - how to ?


Message #1 by "Steen@r... on Mon, 17 Dec 2001 23:18:39 +0100
Hi
I want to put data into the users clipboard for easy paste to excel.

I can copy the data in by using the below codebits:

      <SCRIPT LANGUAGE=3D"JavaScript">
      function ClipBoard(a)
      {

        holdtext.innerText =3D a;
        Copied =3D holdtext.createTextRange();
        Copied.execCommand("Copy");
      }
      </SCRIPT>

      <TEXTAREA ID=3D"holdtext" STYLE=3D"display:none;">
      </TEXTAREA>
      <SCRIPT LANGUAGE=3D"JavaScript">
      ClipBoard("1,2");
      </SCRIPT>

Now, what is missing, is registering the format of the clipboard
contents to CSV
How to do that ?

Any help will be appreciated

Regards Steen R=F8nsberg


  Return to Index