View Full Version : Chained checkbox
icesolid
08-09-2007, 06:55 PM
I was wondering how I could have a checkbox that when selected displayed a selection box with values.
If the checkbox was unchecked it would hide the selection box and then clear the value of the selection box.
Any ideas?
Have a look at http://www.twey.co.uk/?q=forms.
icesolid
08-09-2007, 07:07 PM
hmhmhm.... thats pretty cool.
I am looking for something a little more simple.
Just a checkbox, if selected it will show a selection box.
Unchecked the selection box disappears.
<form action="">
<div>
<input type="checkbox" onclick="this.form.elements['myselect'].display = this.checked ? '' : 'none';">
<select name="myselect">
<option>An option</option>
<option>Another option</option>
</select>
</div>
</form>
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.