views:

18

answers:

2

i have a problem regarding the textbox. i have done the textbox auto expandable but when i insert the text first time then the textbox shrink in size from their original size.but my requirement is that when my text is exceeding the text box length then it auto expand. my code is

<script type="text/javascript">
        $(document).ready(function() {
            $('.txtStyle').autogrow();
        });
</script>

pls somebody suggest how ot is possible

+1  A: 

Try adding a minHeight to your autogrow:

$(document).ready (function() {
    $('.txtStyle').autogrow({
    minHeight: 20,
    lineHeight: 12
    });
})
Konerak
in this condition the line height is maintain throughout the textboxhow can i make it possiblepls suggest me
picnic4u
What do you mean? I don't understand that question.
Konerak
A: 

textbox don't autogrow... because it is not capable of multi lines... use textarea instead...

Reigel
sorry i m misspelled thereit's already multilined
picnic4u