Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q1517 Is there a way to make a select list visible or hidden or at least disbaled depending on what radio button is checked?

irt.org | Knowledge Base | JavaScript | Form | Q1517 [ previous next ]

Q1517 Is there a way to make a select list visible or hidden or at least disbaled depending on what radio button is checked?

The most compatible (only Internet Explorer can hide and show form elements easily) is the following:

<form>
<select name="mySel" onChange="if (this.disabled) this.selectedIndex=0">
.
.
.
</select>
<input type="radio" name="r1" onClick="this.form.mySel.disabled=true">disable
<input type="radio" name="r1" onClick="this.form.mySel.disabled=false">enable
</form>

Feedback on 'Q1517 Is there a way to make a select list visible or hidden or at least disbaled depending on what radio button is checked?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.