fox_statton
asked on
Copy URL to clipboard using JS
Hi all,
Is there anyway I could create a link that would copy the current pages URL to the clipboard (ready to be pasted) when a user clicks on it?
Is there anyway I could create a link that would copy the current pages URL to the clipboard (ready to be pasted) when a user clicks on it?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
Sorry the option is not in the advanced options tab, it is in the custom security option screen in IE. By default it is on although a while ago it was considered a potential security hole and many security policies will have it disabled or set to prompt the user.
Regards,
Lee
Sorry the option is not in the advanced options tab, it is in the custom security option screen in IE. By default it is on although a while ago it was considered a potential security hole and many security policies will have it disabled or set to prompt the user.
Regards,
Lee
http://www.htmlgoodies.com/beyond/javascript/article.php/3458851
https://www.experts-exchange.com/questions/20233392/Copy-to-clipboard.html
and for the current URL, put location.href to a hidden text box and select it before copying.