I have an input.
<input name="inputName" id="inputId" value="Hello" />
Lets pretend that the cursor is after the e in hello, like so:
He|llo
How can I determine the position of the cursor within that string? Meaning, how can I make it tell me that the cursor is right after string{1} (or before string{2})?
Edit: Really though, my end goal is determine if the cursor is at the end of the string. I don't need to know if its in the middle. If it's at the end of the string, I am capturing arrow presses and will make it jump to the next form element. If it's at the beginning or middle, then I am not making that jump to the next form element. Jumping around on arrow presses works already, but it jumps irregardless of where the cursor is in the string.