tlp560
asked on
hide/un-hide section (on check/un-check checkbox)
I have a list of checkboxes that asking users for input, the last one will be "Others" - when users selected this checkbox, it'll show another textarea so they can type in some text ... when they un-checked the box, the textarea should be disappear.
<form action = "test.asp" method="post">
<input type="checkbox" name="name1" value="value1"> Value1
<input type="checkbox" name="name2" value="value2"> Value2
<input type="checkbox" name="name3" value="others"> Others
below will be shown only when user selected "Others", disappear when uncheck.
<textarea name="text2Enter" rows="3" cols="30"></textarea>
</form>
Please help :) thank you very much,
<form action = "test.asp" method="post">
<input type="checkbox" name="name1" value="value1"> Value1
<input type="checkbox" name="name2" value="value2"> Value2
<input type="checkbox" name="name3" value="others"> Others
below will be shown only when user selected "Others", disappear when uncheck.
<textarea name="text2Enter" rows="3" cols="30"></textarea>
</form>
Please help :) thank you very much,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
or <input type="checkbox" name="name3" value="others" onclick="document.getEleme ntById('te xt2Enter') .style.dis play=(this .checked?' blocked':' none')">
you probably mean "block" and not "blocked"!?