• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 130
  • Last Modified:

How do I add copy this code type multi line "forms" to a web page

This may seem basic, but what is the best way to add "copy this code"-type links into a web page.

So that the pages look something like this:

http://www.cdc.gov/Widgets/

I guess I could copy the html source code on this page, but wonder if there are some tips and hints I should keep in mind when creating such "forms"

Thanks

Rowby
0
Rowby Goren
Asked:
Rowby Goren
  • 2
1 Solution
 
dan_nealCommented:
The sample that you would like to imitate are simply textarea fields with desired styling applied through a class.  The content of the textarea is created by a javascript function.  The fields on the sample have an onclick event to highlight or select the entire text contained to make it easier for copying that could be moved to a link similar to what EE does in the code snippet boxes.
0
 
Rowby GorenAuthor Commented:
Thanks

Unlike experts exchange snippet, the snippet would already appear on the webpage in a textarea".  

Do you or anyone know where I can get the onclick event etc to make it easier to copy the code for the website visitor?

Thanks

Rowby
0
 
Rowby GorenAuthor Commented:
Thank you!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now