Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > ColdFusion > preserving mult...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 1622 of 1695
Post > Topic >>

preserving multiple values

by "HandersonVA" <handersonva@[EMAIL PROTECTED] > Oct 26, 2006 at 06:29 AM

when i submit the form, it will show the selected values as an output.
how can I preserve the multiple values in the pick list after
submitting the form? currently, only red value will be selected even
though the multiple values are selected.

<body>
<h2>Multiple Selection List Example</h2>
<cfoutput>
<form action="multiselectionpick.cfm" method="Post">
</cfoutput>
<table>
  <tr>
    <th>Colors:</th>
  <td>

<select name="Colors" multiple>
	<option value = "">
	<cfoutput query="bqry01">
	<option value="#bqry01.index_id#" <cfif form.colors EQ
bqry01.index_id> selected="selected"</cfif> />#bqry01.color#
	</cfoutput>
	</select>
	</td>
    <td><input type="submit" name="submit" value="submit"></td>
  </tr>
  <tr>
    <td colspan="3">Use the ctrl key to select multiple colors</td>
  </tr>
</table>
</form>


<!--- If the page has been submitted to itself, output the values
passed
      by the form --->
<cfif IsDefined('form.Submit')>
<hr>
<cfoutput>
You selected: <b>#form.Colors#</b> 
</cfoutput> 
</cfif> 
</body>
 




 2 Posts in Topic:
preserving multiple values
"HandersonVA" &  2006-10-26 06:29:33 
Re: preserving multiple values
Peter Tilbrook <peter.  2006-10-27 19:26:15 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 19:26:46 CDT 2008.