Hi, here is a sample of a program that does something similar to what you need:

Code

<HTML>

<HEAD> <SCRIPT> function Changer() //Javascript function to change what is shown depending on what is selected in the select box { if (Test.Select.value == "One") //Check the select box - Test is the name of the form and Select is the name of the select box { One.style.display = 'block'; //Show the table called One Two.style.display = 'none'; //Hide the table called Two } else if (Test.Select.value == "Two") { One.style.display = 'none'; Two.style.display = 'block'; } } </SCRIPT> </HEAD>

You should notice that if you choose one and fill in the text box, then choose two, the value in the first text box will not be lost. It will also be passed when you submit the form when two is selected.

I gave the <TABLE> tag an id which, when manipulated, changes everything between the <TABLE> tag and the </TABLE> tag, therefore allowing me to put anything I wanted there.

When dealing with <INPUT> <SELECT> <TEXTAREA> ect, tags, you need to have an attribute called NAME in order to pass the values to your program. When manipulating these values with javascript, they are subsidaries of the <FORM> tag so therefore need to be accessed by using the name of the form to point to it and then the name of the tag you wish to manipulate.

Hope this helps. I am not very good at explaining things, but hopefully you can see what is being done by the program.