View Full Version : Reading and setting cursor position in text box

05-19-2007, 06:31 AM
Hi all,
can anyone just give me a clue on how to set the cursor at a specified position in a text box using java script. I would also appreciate your help reading the current position of the cursor in the text box.
My actual problem goes like this:

my textbox contains say value : 'dynmic'

now i click the mouse in the position between the characters n and m and start inputing some other text(not from the keyboard but using mouse click events). say i enter 'a' followed by 'b' and then 'c'.

now the text bow should have 'dynabcmic' and cursor should be blinking between the characters 'c' and 'm'

(i.e) i want every entry to be made sequentially based on the position of the cursor in the text box. also i want the cursor blinking in the text area in the appropriate position.

i would appriciate your quick support

05-19-2007, 06:58 AM
Here: http://blog.vishalon.net/Post/57.aspx

05-19-2007, 07:57 AM
thanks for the support...that was really useful