Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<CFSELECT> Question

Status
Not open for further replies.

BobMathon

Programmer
Jul 24, 2000
1
CA
I am having problems using the CFSELECT command.<br>Here is the problem:<br><br>I am using a Query to populate the pulldown and the pulldown allows multiple selections.&nbsp;&nbsp;Now I want to use<br>the selected feature of the CFSELECT tag to select more<br>than just one value.&nbsp;&nbsp;I can use it to select one value<br>but i can't figure out how to select multiple values,<br>is this possible?
 
You cannot use CFSELECT for this, you must make your own selectlist.<br>Tell me how are the multiple selections stored in database and I will show you how.<br><br> <p>Russ Michaels<br><a href=mailto:russ@satachi.com>russ@satachi.com</a><br><a href= Internet Development</a><br>For my personal book recommendations visit <br>
 
I am including code I use to set &quot;selected&quot; on and don't<br>see any reason you couldn't do same to set multiple<br>&quot;selected&quot; fields with a little changing.<br><br>&lt;td&gt;&lt;select name=&quot;routing&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;title=&quot;Select Routing from list, or press Submit to accept default shown&quot;<br> onMouseover=&quot;window.status='Select Routing from list, or press Submit to accept default shown'&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onMouseout=&quot;window.status='';&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;size=&quot;1&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!---&nbsp;&nbsp;onChange=&quot;setshipvia();&quot;&gt; ---&gt;<br>&nbsp;&lt;CFOUTPUT query=&quot;ShowShipVia&quot; group=&quot;ship_via_code&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;cfif #ShowShipVia.ship_via_code# EQ #getshipto.ship_via_code#&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;option selected value=&quot;#ship_via_code#&quot;&gt;#svm#<br> &lt;cfelse&gt;<br> &lt;option value=&quot;#ship_via_code#&quot;&gt;#svm#<br> &lt;/cfif&gt;<br>&nbsp;&lt;/CFOUTPUT&gt;&lt;/select&gt;&lt;/td&gt;
 
i don't know about the cfselect but i do about the select : &quot;If the MUTLIPLE attribute is supplied, users can select multiple options from the list at a time. If the MULTIPLE attribute is not supplied users can select only one option in the list at a time. &quot; --&gt; try <br>&lt;select name=&quot;routing&quot;<br>title=&quot;...&quot;<br><font color=red>MULTIPLE</font><br>onMouseover=&quot;...&quot;<br>onMouseout=&quot;...&quot;<br>size=&quot;1&quot;&gt;<br>
 
see if this helps out:<br><br>&nbsp;&lt;select name=&quot;bcg1&quot; size=&quot;1&quot; onChange=&quot;updatesum()&quot;class=&quot;drop&quot;&gt;<br> &lt;cfset begin = 0&gt;<br> &lt;cfset end = #total1.points_allocated_points#&gt;<br> &lt;cfloop from = #begin# to = #end# step=1 index=&quot;bcg1&quot;&gt;<br> &lt;cfoutput&gt;<br> &lt;option value=&quot;#bcg1#&quot;&gt;#bcg1#&lt;/option&gt;<br> &lt;/cfoutput&gt;<br> &lt;/cfloop&gt;<br>&nbsp;&nbsp;&nbsp;&lt;/select&gt;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top