How to get click to copy to clipboard and open a site?

how to do click to copy to the clipboard and open site. examples of this kind of script can be viewed on this page www.retailmenot.com/ on the yellow boxes with the discount text.

Copying items to the clipboard is highly not recommended as there are major security risks in doing so that hackers use to there advantage. In newer browsers this is not an issue as your required to allow and disallow access for a website to see your clipboard but in older browsers this by default is always set to allowed.

JavaScript doesn’t allow you to do things like that. You can do it in JScript which is Internet Explorer’s equivalent language but only if the person visiting has certain security settings turned off on their computer.

The best you can do that works across all browsers is to select all the content so that your visitor only has to press ctrl-C (or equivalent) to copy it to their clipboard.

there are major security risks? what’s the security risks of it? could you give me more detail. thank you.

if javascript can’t get that? how this site (www.retailmenot.com) to get that effect?

works across all browsers is to select all the content so that your visitor only has to press ctrl-C (or equivalent) to copy it to their clipboard. i don’t know how to do this? could you give me more details? thank you

That site is using flash to copy content to the clipboard which from memory is 100% safe and will work across all browsers.

Like i said using javascript and allowing it to have access to the clipboard allows a hacker to gain access to their entire clipboard history including passwords, usernames, emails etc.

thanks, you make me know a lot. could you tell me how the site get this effect. (when i put my mouse over the discount text, it shows an image “click to copy& open site”)

Here’s a flash work around i found http://bravo9.com/journal/copying-text-into-the-clipboard-with-javascript-in-firefox-safari-ie-opera-292559a2-cc6c-4ebf-9724-d23e8bc5ad8a/

thank you. i have get the effect. but still don’t get this effect. (when i put my mouse over the discount text, it shows an image “click to copy& open site”. which on the right of the discount text)

It’s not working in chrome.

Thats out of my control, i can only share what i find. You would need to get in contact with the original developer and try to find a more updated version.