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?
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.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
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.
Code:<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>
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Bookmarks