I am trying to copy content to clipboard using https://github.com/zeroclipboard/ZeroClipboard. It seems a good library, but I am getting the error 'Error calling method on NPObject.' when the copy button (a flash) is hovered.
Seems like a flash security problem, but I am able to load the flash content.
Any ideas?
In versions after 1.1.7, if you hosted "ZeroClipboard.swf" on a different domain than the hosting page, you need to set "allowScriptAccess" to "always" other than "sameDomain", also "trustedDomains" should contain current page domain.
ZeroClipboard.setDefaults( { moviePath:'http://YOURSERVER/path/ZeroClipboard.swf',allowScriptAccess: "always",trustedDomains: location.hostname } );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With