creating a textarea with javascript
<p>I'm trying create a text area in a div with the id of "body". I call the function with an onClick event, but when I click it all that is created is [object HTMLTextAreaElement]. I am not quite sure how to get this to work.</p>

<pre><code>function opentextarea() {
var input = document.createElement('TEXTAREA');
input.setAttribute('name', 'post');
input.setAttribute('maxlength', 5000);
input.setAttribute('cols',80);
input.setAttribute('rows', 40);
var button = document.createElement('BUTTON');
document.getElementById("body").innerHTML=input, button;
}
</code></pre>
