Reputation: 75
I am working on a page that accepts entry into a single textarea, then splits the contained text across two output textareas in realtime should it reach a certain character limit (the first with 0 - x characters, the second with x - end). I have the copying process working, but am at a loss on how to approach the division and have the first textbox stop accepting input while continuing real-time entry on the second one.
Upvotes: 0
Views: 135
Reputation: 332
You could move the cursor between textboxes by using.
$('newTextBox').focus();
For the charater limit, use this.
<textarea maxlength="50">
</textarea>
Note that it doesn't work on Internet Explorer 9 and earlier versions, or in Opera.
Upvotes: 0
Reputation: 9925
I think you should be able to call .focus()
on the second box to force the cursor into it
Upvotes: 0