473,385 Members | 1,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Resizing height of Text Area input control

Hi

I found the below scripts which are used to dynamically resize the height of
the text area input control. The site I found it on www.webdeveloper.com had
it being called with the following event of the text area control:
onfocus="adjustRows(this)"

The problem is I want these to be called when the control is loaded rather
than onFocus. There can be any number of these text areas on the page as I
have them inside of a datagrid which is populated from a database.

Basically what I am after is each text area control expands in height
depending on the amount of text it is populated by from the database, so
that there is no scroll bar displayed for it.

Any help is greatly appreciated.

Thanks

Brendan

function cursorEOT(isField)
{
isRange = isField.createTextRange();
isRange.move('textedit');
isRange.select();
testOverflow = isField.scrollTop;
if (testOverflow != 0){return true}
else {return false}
}

function adjustRows(isField)
{
while (cursorEOT(isField)){isField.rows++}
}
--
______________________________________________
Rate your experiences with your UK and Ireland builders at
http://www.ratethebuilder.co.uk
=========================================
Nov 27 '06 #1
0 1424

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: MB | last post by:
Hi! I am trying to make a dynamic GroupBox that will contain a variable number of child controls of a single type, e.g. RadioButtons or CheckBoxes. I want to read the neccesarry information...
11
by: Jozef | last post by:
I have some old code that I use from the Access 95 Developers handbook. The code works very well, with the exception that it doesn't seem to recognize wide screens, and sizes tab controls so that...
0
by: Sam Barham | last post by:
I have a ListView control, for which I have overwritten the WndProc method to gain access to the WM_PAINT message and generate my own OnPaint and OnPaintBackground messages, in order to colour the...
10
by: David W. Simmonds | last post by:
I have a DataList control that has an Image control in the ItemTemplate. I would like to resize the image that goes into that control. I have a series of jpg files that are full size, full...
13
by: Martin Ho | last post by:
I know this must be trivial for many of you. But I am playing with this and can't figure it out. I have a form, on that form is one panel which has 3 textboxes, when I run my program and...
6
by: gilbert.george | last post by:
Hi, I am setting the width of a textarea using the style.width to ensure the textarea is exactly the right width. I want to set the height/rows of the textarea depending on it's contents (so...
3
by: Arielle | last post by:
Problem: Using an XHTML doctype for all our pages, this is not optional. The layout the client wants to use requires the site to be "full screen" with a header, footer, horizontal menu, and main...
10
by: mishrarajesh44 | last post by:
hii all, I am facing a problem currently.. i have a script for image uploading and resizing.. the image uploading takes place properly for every size images.. but, the resizing works for...
2
by: wannasee | last post by:
Hello everybody, I am new at javascript and I would like to write a script that resizes the input fieds of an html table depending on the entered text. The input fields are placed in table cells...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.