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

what browser are you using?

I think that the clipboardData object only works in IE.

Jump to Post

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 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.