Solved

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

Posted on 2008-10-03
5
912 Views
Last Modified: 2013-11-19
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?
0
Comment
Question by:mmingfeilam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 44

Accepted Solution

by:
scrathcyboy earned 250 total points
ID: 22638856
"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
 

Author Comment

by:mmingfeilam
ID: 22639897
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
 
LVL 75

Assisted Solution

by:Michel Plungjan
Michel Plungjan earned 250 total points
ID: 22639902
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
 

Author Comment

by:mmingfeilam
ID: 22888225
mplungjan: can you give me a simple example?
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 22892952
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

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remaiā€¦
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question