1) Script Title: Select (and copy) Form Element Script
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamici...selectform.htm
3) Describe problem: For some reason I am unable to get highlight to activate when I press "select all". Am I missing some thing? A piece of code?????
Code:<style> .highlighttext{ background-color:yellow; font-weight:bold; } </style> <script language="Javascript"> <!-- /* Select and Copy form element script- By Dynamicdrive.com For full source, Terms of service, and 100s DTHML scripts Visit http://www.dynamicdrive.com */ //specify whether contents should be auto copied to clipboard (memory) //Applies only to IE 4+ //0=no, 1=yes var copytoclip=1 function HighlightAll(theField) { var tempval=eval("document."+theField) tempval.focus() tempval.select() if (document.all&©toclip==1){ therange=tempval.createTextRange() therange.execCommand("Copy") window.status="Contents highlighted and copied to clipboard!" setTimeout("window.status=''",1800) } } //--> </script>Code:<!--###### egg 1######### --> <img src="xxxx" border="0"></img><br> <form name="Egg1"> <a class="highlighttext" href="javascript:HighlightAll('test.select1')">Select All</a><br> <textarea name="select1" rows=8 cols=45>This is some text. This is some text. This is some text. This is some text.</textarea> </form><br> <img src="bar1.png" border="0"><br><br> <!--###### egg 2 ######### --> <img src="xxxx" border="0"></img><br> <form name="Egg2"> <a class="highlighttext" href="javascript:HighlightAll('test.select2')">Select All</a><br> <textarea name="select2" rows=8 cols=45 >This is some text. This is some text. This is some text. This is some text.</textarea> </form><br> <img src="bar1.png" border="0"><br><br> <!--###### egg 3 ######### --> <img src="xxxx" border="0"></img><br> <form name="Egg3"> <a class="highlighttext" href="javascript:HighlightAll('test.select3')">Select All</a><br> <textarea name="select3" rows=8 cols=45 >This is some text. This is some text. This is some text. This is some text.</textarea> </form><br>



Reply With Quote

Bookmarks