Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shrink and growable text area in form

Status
Not open for further replies.

jassingh

Programmer
Mar 4, 2003
4
GB
I am working on a page where a table is used as a container for form elements. The table is divided into 3 main cells - (some containing other tables) . The left most contains user options and the right a text area for user imput. The middle is used as an empty padding cell.

The height of this table is fixed.

The problem is we want the the text area to shrink and grow width wise as and when the user increases/decreases page width.

At the moment - the middle cell does this, whereas the left cell containg the text area stays fixed.

Any suggestions
 
Use the "onresize" event of body element to resize your textarea. for exemple, if your textarea id attribute is set to "userInput" and you want its width to be the half of total document width, do the following :
Code:
function resizeInput
  dim o_textArea
  Set o_textArea = document.getElementById("userInput")
  o_textArea.style.width = Cstr(Cint(window.screen.availWidth / 2)) & "px"
end function
Water is not bad as long as it stays out human body ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top