[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2008-10-03
5
Medium Priority
?
915 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 750 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 750 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
Find out what you should include to make the best professional email signature for your organization.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

649 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