[Javascript] compose dynamical forms with JS
Andrew Dunn
Andrew at d2k.com.au
Tue Jan 28 20:19:06 CST 2003
I presume your using document.write and the "zones of text" appear on a
new page? I think if you try writing the text within a DIV tag it might
work.
-----Original Message-----
From: noel.jean-baptiste at courrier.uqam.ca
[mailto:noel.jean-baptiste at courrier.uqam.ca]
Sent: Wednesday, 29 January 2003 12:07 PM
To: javascript at LaTech.edu
Subject: [Javascript] compose dynamical forms with JS
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
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript
More information about the Javascript
mailing list