textarea to output p - max length or height
<p>I have a <code>textarea</code> text box and a viewable <code>p</code> area which displays the input. <br />
I am trying to control the the amount of text input based on <code>p</code> height or <code>textarea</code> max string length. <br />
There are 2 issues im facing:<br /><br /></p>

<p>1) Once <code>p</code> goes beyond max height or <code>textarea</code> gets max length, <code>textarea</code> should stop accepting input.<br /><br />
2) After the max from above happens, pressing backspace or delete in <code>textarea</code> does not change <code>p</code>.<br /><br />
<a href="http://jsfiddle.net/nalagg/sPeas/9/" rel="nofollow">here is my fiddle </a></p>

<p><strong>edit</strong>:  <a href="http://stackoverflow.com/questions/10414420/how-to-prevent-user-to-enter-text-in-textarea-after-reaching-max-character-limit">this helps</a> with part 1 but had to use <code>keydown</code> (textarea stops accepting input), but then hitting backspace still does not reflect on <code>p</code></p>

<pre><code>    if (this.value.length == max || height&gt;50) {
            e.preventDefault();
    } else if (this.value.length &gt; max) {
            // Maximum exceeded
            this.value = this.value.substring(0, max);
    }else{
        recField.html(this.value);
        height = recField.height()
        $('.temp').text(height);
    }
</code></pre>

<p><strong>after more tests</strong>, <code>keydown</code> has issues, <code>p</code> does not reflect input from <code>textarea</code> like <code>keyup</code> does.<br /> : ( <br />back to square 1</p>
