Hey folks,

I am running into a really good function in JavaScript but I wonder how it is used. I've done a bit of search on how it is used and have seen examples but none of the examples seem to work for me anyway.

it throws an error at me saying "TypeError: window.clipboardData is undefined" on the second line.

`  var a = "hello world";
   window.clipboardData.setData("Text",a);    // TypeError: window.clipboardData is undefined
   alert(window.clipboardData.getData('Text'));

`

Cheers,

Recommended Answers

All 2 Replies

what browser are you using?

I think that the clipboardData object only works in IE.

I'm using Firefox.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.