I am just wondering if it is possible to determine where the cursor is located within an <input type='text'> element using JavaScript?
I'd like to write a snippet of code that will move to the focus to the next text box when the user has pressed the left arrow key and the cursor location has hit the text box's maxLength.
Likewise I'd like the focus to move to the previous text box when the user has pressed the right arrow key (or backspace) and the cursor location has hit the beginning of the text box.
I can't seem to find any property that indicates what the index value of where the cursor is located at within a text element.
Thanks for your help!
-Frinny