Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Using Select Controls to enable/disable another select

    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.

    Code:
    <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/showthre...control+enable

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Sounds like you are looking for a chained select script:
    http://www.dynamicdrive.com/dynamici...ects/index.htm
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by _Aerospace_Eng_ View Post
    Sounds like you are looking for a chained select script:
    http://www.dynamicdrive.com/dynamici...ects/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.

  • #4
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    bump this


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •