faqts : Computers : Programming : Languages : JavaScript : Forms : SELECT

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

75 of 119 people (63%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

How do I disable/enable a select box based on the onchange of another select box?

May 2nd, 2000 09:04
Martin Honnen, Sonya Mlodzek,


You take the code from
http://www.faqts.com/knowledge-base/view.phtml/aid/2497/fid/178/lang/
and call it in onchange of the other SELECT:
  <SELECT NAME="select1"
    ONCHANGE="if (this.selectedIndex == someIndex)
                toggleSelect(this.form.select2);"
  >