Copying text on a PeopleSoft page to the Clipboard using JavaScript

I found a scenario where it would be nice to automatically copy text from a PeopleSoft page and place it into the Clipboard.

Here is how you can do it…
1. Add an HTML element to a page and change it to “Constant”
2. Then just past in this JavaScript. You will need to change the Id for your field you are wanting to copy.

This only works in IE but you could write it for cross-browser support.

I added this to copy the XML Schema from the message definition schema page.