Click to See Complete Forum and Search --> : build textArea with the same page html


jean-baptiste
01-29-2003, 02:51 PM
Hello, suppose I have a page HTML:
...
< TD><SELECT SIZE="1 "NAME="appoint" onchange="creerText(this) ">
<OPTION selected="">0</OPTION >
<OPTION>1</OPTION>
<OPTION>2</OPTION >
</SELECT></TD >...
I will wish that when the user selectionne a value (0,1 or 2) the function Javascript creerText() creates a zone of text (textarea)
below the selection (<select>) in same page HTML.
For example, I thought of following function JS:
function creerText(obj) {
var zoneText = obj.selectedIndex;
for all zoneText do:
create a textArea;
}
But here, I do not manage to make so that my zones of text appear below the zone of selection. Indeed, they appear in new HTML page.

In made, it is as if the utilsator built a "form dynamically".
For example, the user could say, I would like 2 zones of text, 3 drop-down menu of such size etc... and the page is built dynamically.
Is it possible with HTML AND Javascript, how doing?
Thank you,
Jean-Baptiste

jean-baptiste
01-29-2003, 06:39 PM
Thank you Dave, iit was exactly what I wanted.