This plugin makes it easy to have auto-growing textareas. Meaning, if you have a textarea, as the user types it will expand vertically to accommodate the size of the entry. This was inspired by Facebook's auto-expanding text areas.
To make a textarea autogrow, simply do this
1. download jsquery plugin :
http://plugins.jquery.com/files/jque...ow-1.0.2.1.zip
2. extract to you localhost folder and crate dome.html file
call jquery javascript
Code:
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.autogrow.js"></script>
crate function javascript
Code:
<script type="text/javascript">
$(document).ready (function() {
$('textarea.expanding').autogrow();
});
</script>
<style type="text/css">
textarea.expanding {
line-height: 18px;
}
</style>
and then make your textarea form
Code:
<form>
<textarea style="width: 400px; height: 84px; min-height: 84px;" class="expanding" name="myTextarea"></textarea> example 1 <br>
<textarea class="expanding" style="max-height: 100px" name="myTextarea2"></textarea> example 2
</form>
you can see demo :
http://www.ajax-tutorial.net/downloa...area-autogrow/
download file demo have modification:
ajax textarea auto-grow | Ajax Tutorial