Enhancing ASP.NET Pages with JavaScript
Subject:   Customizing the cursor position in text box
Date:   2006-12-18 03:30:06
From:   prvn
How to set the cursor to a custom position(at any location the user wants) in a text box? Say, if we default a text box with some text(on a button click event) and we need to place the cursor at the end of the string in the text box.

The Java Script function textbox1.focus() places the cursor only at the first position. Is there any means to change the function by passing some parameters or something like that to achieve the above said problem.

Expecting your suggestions.