Skip to main content
Known Participant
February 22, 2010
Question

how to do this here

  • February 22, 2010
  • 1 reply
  • 475 views

hi i have a code for select drop down box and this select dropdown is able to select multiple options , i need logis that when user selects multiple options ,but user has to get side display that what the user selects from drop down. Can i get any help in this

Thanks

select  name="div_no"  multiple="true" size="5"  >
        <cfoutput query="qryDivisions">
        <option value="div_no">#div_no# - #div_desc#</option>       
        </cfoutput>       
        </select>

This topic has been closed for replies.

1 reply

Inspiring
February 22, 2010

Change this:

<option value="div_no">#div_no# - #div_desc#</option>      

to something like this:

<option value="#div_no#|#div_desc#">#div_no# - #div_desc#</option>      

Then write an onchange event handler for the select control that parses the selected values and displays the descriptions somewhere.

This approach is also handy after the form is submitted.  You can show the user what he selected without having to go back to the db.

cfnewAuthor
Known Participant
February 24, 2010

hi i made same thing but i need to show user that when user selets multiple options from that select dropdown user must have to see those options what he selected just below this dropdown.