0

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.

Kibbles
  • 65
  • 8

2 Answers2

0

I think you should be able to call .focus() on the second box to force the cursor into it

Yarek T
  • 9,715
  • 2
  • 28
  • 38
0

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.

Henry
  • 342
  • 1
  • 2
  • 13