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
=========================================