...

View Full Version : Using Select Controls to enable/disable another select



metalface
12-07-2006, 04:29 PM
I've searched high and low to find a solution to this problem I'm having with Select controls. I'd like to be able to be able to change the status or visibility of a counterpart select control depending on the choice I make with the first select control I change.

Here's the example: http://appsrv.pace.edu/specialevents/deans.cfm

For instance, I have two select boxes (#1 and #2 for this example). Say I have several choices in a #1 like Apples, Oranges, Bananas. If I were to select Apples I want the #2 Select box to become enabled. The default for #2 would be disable (grayed out). Then say if I change my mind for the #1 select and choose Bananas instead. The #2 select should then gray out. Any help appreciated.



<cfform name="Performance" timeout="500" height="800" width="800" format="flash" skin="haloSilver" action="action.cfm" method="post">

<cfselect name="Title" label="Title" width="200" tooltip="Please enter appropiate title." required="Yes" >
<option>Select</option>
<option value = "Asso. & Asst. Deans" onchange="object.removeAttribute('disabled')">Asso. & Asst. Deans</option>
<option value = "Asso. & Asst. Provost & VPs">Asso. & Asst. Provost & VPs</option>
<option value = "Campus Directors">Campus Directors</option>
<option value = "Dean for Students">Dean for Students</option>
<option value = "Executive Directors">Executive Directors</option>
<option value = "Faculty">Faculty</option>
<option value = "Officers">Officers</option>
<option value = "School Deans">School Deans</option>
<option value = "University Directors">University Directors</option>

<cfselect name="School" width="200" required="Yes" enabled="false" >
<option>Select</option>
<option value = "Dyson">Dyson</option>
<option value = "Education">Education</option>
<option value = "Law">Law</option>
<option value = "Lienhard">Lienhard</option>
<option value = "Lubin">Lubin</option>
<option value = "Seidenberg">Seidenberg</option>

</cfselect>

The problem is similar to this I think: http://www.codingforums.com/showthread.php?t=86657&highlight=select+control+enable

_Aerospace_Eng_
12-07-2006, 04:31 PM
Sounds like you are looking for a chained select script:
http://www.dynamicdrive.com/dynamicindex16/chainedselects/index.htm

metalface
12-07-2006, 04:58 PM
Sounds like you are looking for a chained select script:
http://www.dynamicdrive.com/dynamicindex16/chainedselects/index.htm

I need the disable/enable. This script is not dependent on the user's choice. For each selection I want the different responses/actions. So if I choose Apple the next select box is enabled. If I chose oranges, the select again is disabled.

metalface
12-07-2006, 09:52 PM
bump this



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum