[Javascript] compose dynamical forms with JS
noel.jean-baptiste at courrier.uqam.ca
noel.jean-baptiste at courrier.uqam.ca
Tue Jan 28 20:06:48 CST 2003
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 another page.
This page HTML is a form which contains data that the utilsator filled
progressively, so data must be saved when function JS is called.
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?
Thank you,
Jean-Baptiste
More information about the Javascript
mailing list