Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default 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 in my
    database that contains the info that will be in the drop downs. can i query the
    datasource and have the records from the table display in my drop down list? i
    also have a field in the table with a webpage; can i use that to correspond to
    the record displayed? hope this makes sense. i tried it once and got it, but it
    only displays one record. thanks to anyone who can help!

    straffenp 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. 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...
    4. 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. ...
    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: dynamic drop downs

    On 2005-06-20 20:26:03 -0500, "straffenp" <webforumsuser@macromedia.com> said:
    > 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 in my database that contains the info that will be in the
    > drop downs. can i query the datasource and have the records from the
    > table display in my drop down list? i also have a field in the table
    > with a webpage; can i use that to correspond to the record displayed?
    > hope this makes sense. i tried it once and got it, but it only displays
    > one record. thanks to anyone who can help!
    This is all quite possible and very simple. Concerning the drop-down
    you can either just loop through the query to create the options, for
    example:

    <select name="myDynamicSelect">
    <cfoutput query="myQuery">
    <option value="#id#">#value#</option>
    </cfoutput>
    </select>

    #id# and #value# above would be the names of the database fields you
    want to use for these elements.

    Or you can use cfselect inside a cfform and use the query attribute:
    <cfform name="myForm">
    <cfselect name="mySelect" query="myQuery"
    value="database_field_with_value"
    display="database_field_with_display_content" />
    </cfform>

    Hope that helps,
    Matt
    --
    Matt Woodward
    [email]mpwoodward@gmail.com[/email]
    Team Macromedia - ColdFusion

    mpwoodward *TMM* 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