Link to home
Start Free TrialLog in
Avatar of Coast Line
Coast LineFlag for Canada

asked on

Loading the contents based on other select box usinhg query results

Hello Experts.

HI am using a link to load the contents of users in a table:

the users details are shown in the select box:

what i want to do is select the user from the select box and load the contents of that user in the below other select boxes as it is in database.

Like i have one query which gets username details:

<cfinvoke component="cfc.auth" method="getlogins" returnvariable="gm"/>

now i am doing this:

<tr>
        <td><div align="right">Choose user</div></td>
        <td><div align="left">
          <select name="chooseuser" id="chooseuser" tabindex="1">
                <cfoutput query="gm">
                  <option value="#id#">#username#</option>
            </cfoutput>
          </select>
        </div></td>
      </tr>

Now what i wanna do is select the user from the above select box and it should display the users details below under:

only thing i think i require is without any submit button, it should pass the query results and show the following information. That's what i think pleae tell me how this can be passed in
Avatar of azadisaryev
azadisaryev
Flag of Hong Kong image

if you are on CF8 - use, for example, a CFDIV with BIND attribute, and bind it to your cfc function that returns formatted data you want to display based on selected value in your <select> list:

<tr>
  <td><div align="right">Choose user</div></td>
  <td>
  <div align="left">
  <select name="chooseuser" id="chooseuser" tabindex="1">
  <cfoutput query="gm">
    <option value="#id#">#username#</option>
  </cfoutput>
  </select>
  </div>
  </td>
</tr>
<tr>
  <td><cfdiv id="userdetails" bind="cfc:cfc.auth.getUserDetails({chooseuser@change})" bindonload="false" /></td>
</tr>

Azadi
Avatar of Coast Line

ASKER

i am not on coldfusion 8
ASKER CERTIFIED SOLUTION
Avatar of azadisaryev
azadisaryev
Flag of Hong Kong image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial