S
Simon
Julian, you wrote about a possible solution for my problem, it's a way I
never thought about, it looks perfect.
But onfortunately, I don't know enough about javascript to convert your
solution into a piece of programming.
Could you please help me?
What are the lines, commands, events, for recognizing no further movements?
At the bottom of this message is the description of rous solution.
Thanks,
Simon
Hi
Two possibilities occurr to me (both non-trivial).
Firstly, I assume that by "last" row, you are including the fact that
the textarea might overflow the actual visual box and so scroll, and
so you are interested in the very end of the text within the textarea.
Solution 1
----------
One solution might be to test whether the cursor "moved". I.e. if you
are at the top or bottom of the text within the text area, pressing
the up or down arrow will produce no further movement. So you could
capture its previous posiition, compare with the new, and if no
change, "assume" that you are in the first or last row.
never thought about, it looks perfect.
But onfortunately, I don't know enough about javascript to convert your
solution into a piece of programming.
Could you please help me?
What are the lines, commands, events, for recognizing no further movements?
At the bottom of this message is the description of rous solution.
Thanks,
Simon
I want to know when the carot(cursor) is in the first row of the
textarea(although rows do not really exist, i know) and I want to know
when
the cursor is in the last row of the textarea.
Why do I want to know that?
Because when the cursor is in the first row and the keycode for "arrow-up"
event fires, the focus has to leave the textarea and go to the field above
it.
Same goes for the last row, when the arrow-down is pressed it has to go to
the next field.
And when it's in between the first and last line, nothing should happen
but
goiing up and down the textarea.
Thanks,
Simon
Hi
Two possibilities occurr to me (both non-trivial).
Firstly, I assume that by "last" row, you are including the fact that
the textarea might overflow the actual visual box and so scroll, and
so you are interested in the very end of the text within the textarea.
Solution 1
----------
One solution might be to test whether the cursor "moved". I.e. if you
are at the top or bottom of the text within the text area, pressing
the up or down arrow will produce no further movement. So you could
capture its previous posiition, compare with the new, and if no
change, "assume" that you are in the first or last row.