Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filed value auto-selected 1

Status
Not open for further replies.

rmagan

Programmer
Jun 3, 2003
35
US
I have a form that has text items in a table. When the user enters the table cell, I want the value to be automatically selected/highlighted (so it is easier to change the value).
Is this possible?

<html>
<form name=&quot;post_grdbk&quot; action=&quot;stars3.star_portal.process_teacher_gradebook&quot; method=&quot;post&quot;>
<table>
<tr>
<td align=&quot;center&quot; nowrap><input type=&quot;text&quot; name=&quot;p_grd_score&quot; size=&quot;5&quot; maxlength=&quot;5&quot; value=&quot;1&quot;>
</td>
</tr>
<tr>
<td align=&quot;center&quot; nowrap><input type=&quot;text&quot; name=&quot;p_grd_score&quot; size=&quot;5&quot; maxlength=&quot;5&quot; value=&quot;2&quot;>
</td>
</tr>
<tr>
<td align=&quot;center&quot; nowrap><input type=&quot;text&quot; name=&quot;p_grd_score&quot; size=&quot;5&quot; maxlength=&quot;5&quot; value=&quot;3&quot;>
</td>
</tr>
</table>
</form>
</html>
 
Sure...

Add onclick=&quot;this.select()&quot; to your input boxes. Example:

Code:
<input type=&quot;text&quot; name=&quot;p_grd_score&quot; size=&quot;5&quot; maxlength=&quot;5&quot; value=&quot;1&quot; onclick=&quot;this.select()&quot;>

All the best,
Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top