I did it before here is a solution that I had provided
viewtopic.php?t=94838&hilit=copy
If you need help then send me an email as I have already done this before. You can contact me using my website signature below.
[/quote]
Thank you. I actually found some code I like and I can get it to work if I add to HTML from WWB Toolbox but I'd really like to add the html/js to a button so it matches my others, is there a way to add html/js to a button? I dont' see it.
Also I like this idea of grabbing the URL but if I wanted to hvae a button always copy to clipboard a specific URL link, how would I change the code below to hardcode a URL?
-------------------------
<!DOCTYPE html>
<html>
<body>
<button onclick="copyToClipboard()">Copy URL Link to Share style="display:inline-block;width:269px;height:40px;z-index:6;">Copy URL Link to Share</button>
<script>
function copyToClipboard(text) {
var inputc = document.body.appendChild(document.createElement("input"));
inputc.value = window.location.href;
inputc.focus();
inputc.select();
document.execCommand('copy');
inputc.parentNode.removeChild(inputc);
alert("URL Copied.");
}
</script>
</body>
</html>