|
Prev: hide whole body but one div
Next: can a function change fields without having "onchange()" in field defintion?
From: jschlosser on 2 Jul 2008 11:09 I can enable a text box with an onChange if ANY option is selected from a select list, but how do I do this for a specific selection? Even better would be if the field didn't appear until after the event. This is for those selecting "other" to tell us what "other" is. Thanks. J Schlosser
From: Peter Michaux on 2 Jul 2008 12:35
On Jul 2, 8:09 am, jschlosser <jschlos...(a)apic.org> wrote: > I can enable a text box with an onChange if ANY option is selected > from a select list, but how do I do this for a specific selection? > Even better would be if the field didn't appear until after the > event. This is for those selecting "other" to tell us what "other" > is. In the onchange event of the select element, examine which option is currently selected with the selectedIndex property. Then (enable and show) or (disable and hide) the text area using something like textarea.disabled=true;textarea.style.display='none'; Give it a try with a complete demo web page that is just 40 lines or less. If you have troubles you can post that code which will give people a way to help you better. Peter |