I'm wondering how to do this: I want to show a code field where the users can copy the code to their own site. Photobucket has a very nice way to do this (example) When you click on one field, it puts the code in the clipboard. I tried looking at their source, but this didn't work: <input name="txtThumbURLTag2" id="txtThumbURLTag2" class="textBox" type="text" value="VALUE" readonly="readonly" onclick="trackCodeClick(event); copyToClipboard(this);"> Code (markup): Anybody have a clue? I searched around a bit, but all the codes didnt seem to work in Firefox AND Internet Explorer.