Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Varying the size of a TEXTAREA
Message
From
24/12/2002 04:56:20
 
 
To
23/12/2002 13:14:12
Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Forum:
Internet
Category:
DHTML
Miscellaneous
Thread ID:
00735410
Message ID:
00735605
Views:
8
>Thanks Michel,
>
>It's beginning to make sense. I'll give it a try.
>
>Mike
>
>>
>>This assumes you have an event on the page that will fire on resizing.
>>
>>You would first need to assign an ID to your table container and to the textarea field.
>>
>>Then, on resize, your javascript might do something like this:
>>
>>
>>document.getElementById("TextArea").style.width=
>> document.getElementById("Table").clientWidth-8
>>
>>
>>This assumes that you have placed your textarea inside your table with a 4 pixels margin. Thus, this is why I am removing 8 pixels in order to have it centered in your table on resize.

This is the technique I used - the same as Michel's idea without the table & avoiding the need to set the initial size of the textarea.
<head>
function SetTASize()
{
document.all.ta1.style.width=document.body.clientWidth
document.all.ta1.style.position="absolute"
document.all.ta1.style.lext="0px"
}
</head>

<body onLoad="SetTASize()" onResize="SetTASize()">
<textarea>
...
</textarea>
</body>
Len Speed
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform