Copy field data to clipboard

Bill,

Thank you for your response.Below is the code that I have written so far. I don’t get any errors but I also don’t get the field contents to the clipboard. 
Can you see the error of my ways?

var element = arguments[0], $ = skuid.$; // Copy to clipboard example //Click Button $( document ).ready(function() { $(‘#copybutton’).click(function() { console.log (“Clicked”); // Clicked // Select the contents x = document.getElementsByClassName(“generatedURL”)[0].innerText; console.log (“Element” + x); // Copy to the clipboard document.execCommand(‘copy’); console.log (“Copied”); }); });