Discussion Locked

Dynamic Forms

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hello, all.

I am hoping to code dynamic forms in Javascript.
I have never used Javascript for this purpose before. Does anybody know where I can find an example application (source code would be great)?

The planned page will have a form with two radio button on it. The
user will indicate if he has a matrix ready for entry by selecting one
of the radio buttons. If he selects "No", the form should be short and
not display fields for entry of the matrix values. If he selects
"Yes", the form should change to display all the input fields for,
say, a 3 X 3 Matrix.

Thanks for any help you can give me.

2 replies

by jay eckles

You should search for a DHTML tutorial. What you'd probably want to do is have the 3x3 matrix on the page, but hide it unless the "Yes" button is checked. You can use SPAN, DIV, or LAYER tags and CSS to put the matrix in a hidden layer. You then use Javascript to change the CSS property to change the layer to visible.

Mind you, that's just one way to do it. There are other approaches if this one doesn't work out for you.

Good luck.

Jay

This discussion is closed to new replies.