Home
Form effects
Here
|
Categories
Other Sections
Sweet Ads
Compatibility
|
|
FF1+ IE5+ Opr7+
Select (and copy) Form Element Script Author:
Description: Allow your surfers to easily select the contents of your form elements- as we have done with our script containers throughout Dynamic Drive- with this script. And just to outdo ourselves, we've also embedded in this script the ability to concurrently copy the content to clipboard (memory) as well (applicable only in IE 4+). Enjoy! Demo: Clicking on "Select All "will highlight the form's contents, and in IE 4+, copy them to clipboard as well. Step 1: Insert the following script into the <head> of your page: Step 2: Add the below sample form to the <BODY>: That's a wrap. More info on configuring the scriptThe key to adding the "Highlight" feature to your form elements, as illustrated in the code of Step 2, are: 1) Giving your form a name (ie: <a class="highlighttext" href="javascript:selectcopy('test.select1')">Select All</a> directly above the form element, where the part in red
references the form, then the element to highlight's name (note the quotation marks around
it). Or if your form element contains an ID attribute, such as |