Streamlining Drop-Downs

Ask a Question related to Coldfusion Flash Integration, Design and Development.

  1. #1

    Default Streamlining Drop-Downs

    I have a form with literally a hundred fields where the user has to select how
    they rank each item in a drop-down form 0-10.

    Is there a way to call the same drop down and reference it ,rather than having
    the following code literally 100 times on the form?

    <cfselect name="LetsPlay" size="1" width="100" label="Lets Play">
    <option value="0" selected>0</option>
    <option value="1">1<option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    <option value="5">5</option>
    <option value="6">6</option>
    <option value="7">7</option>
    <option value="8">8</option>
    <option value="9">9</option>
    <option value="10">10</option>
    </cfselect>

    i.e can the option values from 0-10 become an include so to speak? I am using
    Flash forms....

    Thanks!

    Magnim Guest

  2. Similar Questions and Discussions

    1. Drop Downs and Embed tag
      We created menus using DreamWeaver, when we put a embeded tag on the page the drop down menu go behind the embeded object. Is there anyway to fix...
    2. add drop downs to a php file
      Hello everyone, this is my first time on here as i have just started using studio mx. I have had the software for quite a while but never got round...
    3. drop downs not working.....
      Hi, I have just finish this page and now I realize it works perfectly in Safari but the drop downs do not work in Explorer on a P.C. or on a Mac. ...
    4. dynamic drop downs
      hey everyone. i'm making a site that uses drop down menus. their content changes depending on where the user is in the site. i have a table set up...
    5. Drop Downs
      Does anyone know of a good tutorial for drop downs. The drop downs I created have alot of bugs which I can't figure out how to fix?...
  3. #2

    Default Re: Streamlining Drop-Downs

    How about

    <cfset option_values = '<option value="0" selected>0</option><option
    value="1">1<option><option value="2">2</option><option
    value="3">3</option><option value="4">4</option><option
    value="5">5</option><option value="6">6</option><option
    value="7">7</option><option value="8">8</option><option
    value="9">9</option><option value="10">10</option>'>
    <cfset namelist = "LetsPlay,Name2,Name3, ... Name100">
    <cfset labellist = "Lets Play,Label2,Label3, ... Label100">
    <cfloop from="1" to="#ListLen(namelist)#" index="i">
    <tr><td>
    <cfselect name="#ListGetAt(namelist, i)#" size="1" width="100"
    label="#ListGetAt(labellist, i)#">#option_values#</cfselect>
    </td></tr>
    </cfloop>

    ... or something like that ..

    Doug
    doug777 Guest

  4. #3

    Default Re: Streamlining Drop-Downs

    Of course if they all say Lets Play, it's even easier:

    <cfloop from="1" to="100" index="i">
    <tr><td>
    <cfselect name="#'LetsPlay' & i#" label="Lets Play">
    <cfloop from="0" to="10" index="j">
    <option value ="j"<cfif j eq 0> selected</cfif>>#j#</option>
    </cfloop>
    </cfselect>
    </td></tr>
    </cfloop>

    Doug
    doug777 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139