how to make a text box/text area expandable but not scrollable

hi,

our clients wants a comment box that automatically expands vertically as the existing box becomes full, but they don't want scrolling.  is this possible?
mmingfeilamAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
scrathcyboyConnect With a Mentor Commented:
"is this possible?"

Simply, NO.  You have to specify a width and a height for a text box area, and that is fixed.  But look at RICH TEXT AREA -- it might be able to do what you want, you will have to see, the normal text area cannot do it

www.textarearich.com/
www.dynamicdrive.com/dynamicindex16/richtexteditor/index.htm
www.tcpiq.com/tcpIQ/HTMLRichTextArea/
www.topshareware.com/HTML-Rich-Text-Area-download-1456.htm
0
 
mmingfeilamAuthor Commented:
is there any that runs on the server side that allows you to save the format (somehow) to the database along with the content?
0
 
Michel PlungjanConnect With a Mentor IT ExpertCommented:
I do not have one at my disposal but
1. capture input when focussing on existing textbox/hide textbox, show div
2. output keystrokes to div and save in hidden textbox
0
 
mmingfeilamAuthor Commented:
mplungjan: can you give me a simple example?
0
 
Michel PlungjanIT ExpertCommented:
Something like this
<script>
function captureIt(cap,field) {
  if (cap) {
    field.style.display='none'
    document.getElementById('output').style.display='';
    document.onkeydown=function(e){
      e=(e)?e:event;
      if(!e)return 0;
      field.value+=String.fromCharCode(e.keyCode);
      document.getElementById('output').innerHTML=field.value
    }
  }
  else document.onkeydown=null;
}  
</script>
 
<input type="text" onFocus="captureIt(true,this)">
<span id="output" style="display:none"></span>

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.