Related Select Boxes - MX7

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Related Select Boxes - MX7

    I have been having quiet some difficulties understanding the binding that has
    to be done to bind between one CFSELECT result and the bind to the second and
    then the third CFSELECT which needs to be dynamically populated.

    Hows is this done? I have removed the binding I had done. Add any other
    components that are not required. Please help!

    CODE:

    <cfquery name="spGetOrg" datasource="#request.dsn#">
    SELECT TOP 100 PERCENT
    dbo.tblOrganisationalCompanyDetails.intOrganisatio nalCompanyID,
    dbo.tblOrganisationalCompanyDetails.nvarOrgCompany Name,
    ISNULL(dbo.tblOrganisationalDivisionDetails.intOrg anisationalDivisionID, 0)
    AS intOrganisationalDivisionID,
    ISNULL(dbo.tblOrganisationalDivisionDetails.nvarOr gDivisionName, '') AS
    nvarOrgDivisionName,

    ISNULL(dbo.tblOrganisationalDepartmentDetails.intO rganisationalDepartmentID, 0)
    AS intOrganisationalDepartmentID,
    ISNULL(dbo.tblOrganisationalDepartmentDetails.nvar OrgDepartmentName, '') AS
    nvarOrgDepartmentName
    FROM dbo.tblOrganisationalDepartmentDetails
    RIGHT OUTER JOIN dbo.tblOrganisationalDivisionDetails
    ON dbo.tblOrganisationalDepartmentDetails.intOrganisa tionalDivisionID =
    dbo.tblOrganisationalDivisionDetails.intOrganisati onalDivisionID
    RIGHT OUTER JOIN dbo.tblOrganisationalCompanyDetails
    ON dbo.tblOrganisationalDivisionDetails.intOrganisati onalCompanyID =
    dbo.tblOrganisationalCompanyDetails.intOrganisatio nalCompanyID
    ORDER BY dbo.tblOrganisationalCompanyDetails.nvarOrgCompany Name,
    ISNULL(dbo.tblOrganisationalDivisionDetails.nvarOr gDivisionName, ''),
    ISNULL(dbo.tblOrganisationalDepartmentDetails.nvar OrgDepartmentName, '')
    </cfquery>

    <cfform format="flash" action="#cgi.script_name#?#cgi.query_string#"
    method="post" skin="halosilver" height="350" width="550">
    <cfselect title="Choose a Company"
    name="company"
    label="Choose a Company"
    query="spGetOrg"
    value="intOrganisationalCompanyID"
    display="nvarOrgCompanyName"
    required="yes"
    width="210">
    </cfselect>
    <cfselect title="Choose Division"
    name="division"
    label="Choose a Division"
    query="spGetOrg"
    value="intOrganisationalDivisionID"
    display="nvarOrgDivisionName"
    required="yes"
    width="210">
    </cfselect>
    <cfselect title="Choose Department"
    name="department"
    label="Choose a Department"
    query="spGetOrg"
    value="intOrganisationalDepartmentID"
    diplay="nvarOrgDepartmentName"
    required="yes"
    width="210"
    enabled="false">
    </cfselect>
    </cfform



    ParaRecce Guest

  2. Similar Questions and Discussions

    1. Multiple select of list boxes
      I am allowing my users to select multiple items in a list box, and I've set that up so it works swell. However, I'm unsure how to set each of the...
    2. Cannot select graphic boxes
      I cannot select graphic boxes on my document pages. I created the graphic boxes and text columns on the master pages. I set the graphic boxes to...
    3. dependent select boxes
      Hello, as seen at: http://www.macromedia.com/support/dreamweaver/ts/documents/client_dynamic_listbo x.htm i'm using that script, the only...
    4. Moving data between select boxes
      Hi I have used ASP code to load data into two select boxes. The code below is used to move the selected data back and forth between the boxes. ...
    5. multiple combo boxes with three related fields
      On Tue, 22 Jul 2003 20:35:44 -0700, "Don Albaugh" <donald.albaugh@med.va.gov> wrote: The simplest way is to follow the idea in your last...
  3. #2

    Default Re: Related Select Boxes - MX7

    the cfselect tag doesn't support the bind attribute at all. To do something
    like this, sorry I don't have an example to show you, you need to use the
    onChange ="" or onClick="" attributes of the 1st cfselect to call the 2nd
    cfselect and to add/remove - basically do what you need to do to it.

    hth,
    ---nimer


    "ParaRecce" <webforumsuser@macromedia.com> wrote in message
    news:cvqq49$66e$1@forums.macromedia.com...
    >I have been having quiet some difficulties understanding the binding that
    >has
    > to be done to bind between one CFSELECT result and the bind to the second
    > and
    > then the third CFSELECT which needs to be dynamically populated.
    >
    > Hows is this done? I have removed the binding I had done. Add any other
    > components that are not required. Please help!
    >
    > CODE:
    >
    > <cfquery name="spGetOrg" datasource="#request.dsn#">
    > SELECT TOP 100 PERCENT
    > dbo.tblOrganisationalCompanyDetails.intOrganisatio nalCompanyID,
    > dbo.tblOrganisationalCompanyDetails.nvarOrgCompany Name,
    > ISNULL(dbo.tblOrganisationalDivisionDetails.intOrg anisationalDivisionID,
    > 0)
    > AS intOrganisationalDivisionID,
    > ISNULL(dbo.tblOrganisationalDivisionDetails.nvarOr gDivisionName, '') AS
    > nvarOrgDivisionName,
    >
    > ISNULL(dbo.tblOrganisationalDepartmentDetails.intO rganisationalDepartmentID,
    > 0)
    > AS intOrganisationalDepartmentID,
    > ISNULL(dbo.tblOrganisationalDepartmentDetails.nvar OrgDepartmentName, '')
    > AS
    > nvarOrgDepartmentName
    > FROM dbo.tblOrganisationalDepartmentDetails
    > RIGHT OUTER JOIN dbo.tblOrganisationalDivisionDetails
    > ON dbo.tblOrganisationalDepartmentDetails.intOrganisa tionalDivisionID =
    > dbo.tblOrganisationalDivisionDetails.intOrganisati onalDivisionID
    > RIGHT OUTER JOIN dbo.tblOrganisationalCompanyDetails
    > ON dbo.tblOrganisationalDivisionDetails.intOrganisati onalCompanyID =
    > dbo.tblOrganisationalCompanyDetails.intOrganisatio nalCompanyID
    > ORDER BY dbo.tblOrganisationalCompanyDetails.nvarOrgCompany Name,
    > ISNULL(dbo.tblOrganisationalDivisionDetails.nvarOr gDivisionName, ''),
    > ISNULL(dbo.tblOrganisationalDepartmentDetails.nvar OrgDepartmentName, '')
    > </cfquery>
    >
    > <cfform format="flash" action="#cgi.script_name#?#cgi.query_string#"
    > method="post" skin="halosilver" height="350" width="550">
    > <cfselect title="Choose a Company"
    > name="company"
    > label="Choose a Company"
    > query="spGetOrg"
    > value="intOrganisationalCompanyID"
    > display="nvarOrgCompanyName"
    > required="yes"
    > width="210">
    > </cfselect>
    > <cfselect title="Choose Division"
    > name="division"
    > label="Choose a Division"
    > query="spGetOrg"
    > value="intOrganisationalDivisionID"
    > display="nvarOrgDivisionName"
    > required="yes"
    > width="210">
    > </cfselect>
    > <cfselect title="Choose Department"
    > name="department"
    > label="Choose a Department"
    > query="spGetOrg"
    > value="intOrganisationalDepartmentID"
    > diplay="nvarOrgDepartmentName"
    > required="yes"
    > width="210"
    > enabled="false">
    > </cfselect>
    > </cfform
    >
    >
    >

    Mike Nimer Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139