ok. lets say i have a field, and as soon as you click on that field, you want all the text contained within the field to be selected automatically. well, you can do that with javascritp on this tutorial i will show you how you can do that.

here is the demonstration example
and here is the code i used:
<script type="text/javascript">
function select_text()
var content=eval("document.myform.field");
<form method="post" action="" name="myform" >
<textarea name="field" rows="4" cols="40" onClick="select_text();">Click Inside the text area to select all
  text within this form field </textarea>

hope you learned something from this short and useful tutorial

courtesy of www.webune.com