Search code examples
coldfusioncfml

Create Copy To Clipboard In ColdFusion


I am working an internal ticketing system for IT positions. What I want to know is if there is a way in ColdFusion (CFML/CFScript) that provides the user with the ability to click a button and copy to clipboard. I know in JavaScript that this is a fairly easy thing to do; however, I am not sure if there is a way within ColdFusion to do this without utilizing JavaScript.

What is happening is the system outputs a quick command for logging into remote clients. Instead of making the technician manually copy and paste, it would be a nice/small thing to make a button to automatically copy it for the user.


Solution

  • Everything CF is a server-side process, so you can't do that. But you can have CF generate the text content of the command. You'd still need a client-side JavaScript function to put that text into the browser's clipboard.