English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I'm looking for a script that will allow me to write a form where if one checkbox is clicked then more options open below it that aren't visible if the checkbox is not checked.
thank you.

2007-03-14 04:31:19 · 2 answers · asked by Tiff 5 in Computers & Internet Programming & Design

2 answers

function showHide (id)
{
var style = document.getElementById('id').style
if (style.visibility == "hidden")
style.visibility = "visible";
else
style.visibility = "hidden";
}

Oh and in the input tag, call the above function in onClick or onSubmit
ex:

2007-03-14 05:08:14 · answer #1 · answered by Anonymous · 0 0

http://www.dougv.com/blog/2006/12/19/showing-or-hiding-html-form-elements-with-javascript/

2007-03-14 12:03:37 · answer #2 · answered by Anonymous · 0 0

fedest.com, questions and answers