How do I convert a simple text box to text area when the user clicks on it. I'm using EXT JS.
Javascript – Change textbox to textarea on click
extjsjavascripttextareauser interface
Related Topic
- Javascript – How to check if an element is hidden in jQuery
- Javascript – var functionName = function() {} vs function functionName() {}
- Javascript – Which equals operator (== vs ===) should be used in JavaScript comparisons
- Javascript – How to copy to the clipboard in JavaScript
- Javascript – How to redirect to another webpage
- Javascript – What’s the difference between using “let” and “var”
- Javascript – How to remove a specific item from an array
- Javascript – How to return the response from an asynchronous call
Best Answer
Are you doing it just for visual appearance? Or is there a valid reason for converting it from input to textarea?
If you are doing it just for the visuals of it you can get a long way with just setting the height of your textarea and in the focus event increase the height.
EDIT: These stopped working:
Try it here: http://jsfiddle.net/chrisramakers/9FjGv/2/You can even quite easily animate it for some extra fancy visualy fancy pancy.http://jsfiddle.net/chrisramakers/9FjGv/3/