| Author |
How to place the cursor at the end of a textfield
|
Rhea Karnam
Greenhorn
Joined: May 06, 2003
Posts: 21
|
|
Hi, I have a text field with some data already entered in it, and i want to let the user to append more characters to the textfield. So, when he/she clicks on a button "Append data", i have written a javascript that sets the focus to the textfield (tf.focus). But, the cursor is placed at the first character. Is there some way to place the cursor after the last character? I am left clueless. I found some help on the web, but that is browser specific. Rhea
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15003
|
|
Netscape usually places the cursor at the end, IE code which you prob. found focus the field, creates a text range, and collasps it and cause the cursor to be at the end. I would post the code, but i need to leave for work in 2 minutes Eric
|
 |
 |
|
|
subject: How to place the cursor at the end of a textfield
|
|
|