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 1 Topic 1621 of 1694
Post > Topic >>

preserving multiple values

by "HandersonVA" <handersonva@[EMAIL PROTECTED] > Oct 26, 2006 at 04:49 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" size="5" multiple>
        <option value="Red" selected>Red</option>
        <option value="Yellow">Yellow</option>
        <option value="Pink">Pink</option>
        <option value="Green">Green</option>
        <option value="Purple">Purple</option>
        <option value="Orange">Orange</option>
        <option value="Blue">Blue</option>
      </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>
 




 1 Posts in Topic:
preserving multiple values
"HandersonVA" &  2006-10-26 04:49:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Thu Jul 24 13:40:11 CDT 2008.