View Full Version : Magically appearing List Box Question

06-05-2003, 07:11 PM
I am looking for code to allow me to do this:
1. I will have a list box appear on the web page.
2. When a certain item is selected in the list box, then two list boxes will appear next to the first list box.
3. And if the "other" item is selected in the third box, a text box will appear.
4. A button will allow the user to choose another item, and the process should loop again using a do/while loop. The items selected will be stored in an array for future use.

I'm kind of a novice to this area and need to know if this can be done, and if so, I need to know how this can be done, and if not, why it can't be done.


06-06-2003, 02:37 AM
When is your homework assignment due?

06-06-2003, 09:52 PM
The general problem is that you want to alternative hide or show some <input> tag when you click on some other thing....

1.Surround the <input> you want to hide/show in a <span id="peekaboo"> tag.

2. In the other <input> tag, the one that triggers the hide/show, call hideShow("peekaboo") from the onClick event.

3. hideShow function simply takes the input parameter (the name of the thing you want to hide/show, and simply set the visibility to hidden. Thus: theIDyouPassedIn.style.visibility = 'hidden'. Replace 'hidden' with 'visible' to un-hide it.

volia. sufflet.

06-09-2003, 04:58 PM
Thank you ... I'll give it a try!