views:

25

answers:

2

I have a single line textbox.

I want to with jquery convert it to multiline but control how many lines that are added to it. I want to also be able to limit the number of characters on each line.

Any ideas how I can do this with jquery?

EDIT:

Yes what I meant by textbox was <input type="text">

EG. <input type="text" value="" name="txtTextBox1" id="xtTextBox1">

A: 

Assuming you want to edit a textarea on the fly, here are some resources:

Autoresize: http://james.padolsey.com/javascript/jquery-plugin-autoresize/ Words, Char counter, max length: http://plugins.jquery.com/taxonomy/term/360 Collection of 7 Textarea JQ plugins: http://www.reynoldsftw.com/2009/03/7-jquery-plugins-to-manipulate-textareas/

If you provide something more specific I'd be happy to go into further detail.

bryan.taylor
A: 

If you are looking to accomplish this yourself take a look at a very rudimentary example I whipped up at - http://jsfiddle.net/2msUj/

If you are looking for a plugin I would recommend taking a look at James Padolsey's work here - http://james.padolsey.com/javascript/jquery-plugin-autoresize/

HurnsMobile