8 Replies Latest reply on Jun 4, 2008 3:00 PM by Dan Bracuk

    Dynamically show 1 row of a cold fusion query

    kenji776 Level 1
      Hey everyone,
      A simple question, I am just have a hard time figuring out the most effecient and easy way to do this. Say I have a query like

      <cfquery name="getcrap" datasource="users">

      <select name="listpeople" OnChange="SOME_MAGIC_JS_FUNCTION(this.value)">
      <cfloop query="getcrap">
      <option value="#getcrap.id#">#getcrap.name#</option>
      <div id="showdetails">I WANT THE JOB ROLE THE PERSON TO DISPLAY HERE</div>

      How can I make that work. Basically a query pulls some values, I loop through the values creating a dropdown list item for each person, and want to show more in depth info on that person when they are selected from the dropdown list. I think I would have to load the data from the cold fusion query into a javscript array or something then display the element of the array signified by the ID passed to the function, but I'm not real sure how to do that. Anybody have any sample code for how to do this?