Skip to main content
Known Participant
February 4, 2011
Question

need to know whre to find some xamples and sample codes

  • February 4, 2011
  • 1 reply
  • 706 views

Hi,

I have a task that needs to be done by javascript and coldfusion.

My scenario is i had three select drop downs  where all select boxes are multiple selectable .

Here i have problem, what i am trying to do is when we select multiple values from first select box then the other two select boxes have to be selected   depending up on the first select box options and aalso have to be selected multiple values if pplicable.

Any help in this appreciated.

Searching from a long time but no luck............

Thanks

This topic has been closed for replies.

1 reply

Inspiring
February 4, 2011

When you last asked this question, you received sample code on how to do it with two related selects.  To do it with 3, do it with two twice.

cfnewAuthor
Known Participant
February 4, 2011

hi Dan,

Thanks for your reply but i have a basic question

here is my sample code

<h2 align="center">This is my example</h2>
<cfquery name="test1" datasource="cfexampls">
    select empno from emp
</cfquery>
<cfquery name="test2" datasource="cfexampls">
    select ename from emp
</cfquery>
<cfquery name="test3" datasource="cfexampls">
    select deptno from emp
</cfquery>

<form>
<select name="empno" multiple>
    <cfoutput query="test1">
        <option name="#empno#" value="#empno#">#empno#</option>
    </cfoutput>
</select>

<select name="ename" multiple>
    <cfoutput query="test2">
        <option name="#ename#" value="#ename#">#ename#</option>
    </cfoutput>
</select>

<select name="deptno" multiple>
    <cfoutput query="test3">
        <option name="#deptno#" value="#deptno#">#deptno#</option>
    </cfoutput>
</select>
</form>

in the above code i had three select Dropdown with multiple selections.


When  i select One or more options in first select Dropdown then i need to  select one or multiple options depends on first select dropdown in  second as well as in  third select dropdown based on second dropdown.

Any help in this

Thanks

hi Dan,

Thanks for your reply but i have a basic question

here is my sample code

<h2 align="center">This is my example</h2>
<cfquery name="test1" datasource="cfexampls">
    select empno from emp
</cfquery>
<cfquery name="test2" datasource="cfexampls">
    select ename from emp
</cfquery>
<cfquery name="test3" datasource="cfexampls">
    select deptno from emp
</cfquery>

<form>
<select name="empno" multiple>
    <cfoutput query="test1">
        <option name="#empno#" value="#empno#">#empno#</option>
    </cfoutput>
</select>

<select name="ename" multiple>
    <cfoutput query="test2">
        <option name="#ename#" value="#ename#">#ename#</option>
    </cfoutput>
</select>

<select name="deptno" multiple>
    <cfoutput query="test3">
        <option name="#deptno#" value="#deptno#">#deptno#</option>
    </cfoutput>
</select>
</form>

in the above code i had three select Dropdown with multiple selections.


When  i select One or more options in first select Dropdown then i need to  select one or multiple options depends on first select dropdown in  second as well as in  third select dropdown based on second dropdown.

Any help in this

Thanks