Stumped on dynamic menu

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Stumped on dynamic menu

    Hi,
    I have setup a basic query to list colours of a clothing item whilst taking on
    the challenge of building an online shop. My simple query returns the colours,
    however I am struggling to get these results into my form's menu for the user
    to select their choice. I have setup the query 'qryItemColours' with the column
    'Colour'. The starting code I have is...

    <select name="Colours" id="Colours">
    <option value="#qryItemColours.Colour#">#qryItemColours.Co lour#</option>
    </select>

    However this only returns the first value. What code do I need to include to
    completly populate this menu with all query results?

    Have searched through forum but with no similar problem. I'm sure I am missing
    something very simple but stumped at this end.

    Appreciate any help.
    Thanking you in advance.:confused;

    Marblehead Johnson Guest

  2. Similar Questions and Discussions

    1. Help with Dynamic Menu
      Hey everyone, I'm developing a piece right now and have come to a stand still. The menu part of the project will contain a number of "Business...
    2. Stumped on Dynamic List/Menu
      I keep posting hoping that someone will have an answer to this stumper: I want to show a product (wooden hanger) with one image, one name, and one...
    3. dynamic menu system going to dynamic page
      please can someone help me - im at the end of my tether! ive got an access db. Its got a list of words that is to be a menu system stored in it....
    4. Dynamic Menu...is it possible?
      I'm new with Flash and I need to know if it is possible with Flash to get a menu created dynamically where the information is coming from a database....
    5. Dynamic Menu Help
      Hello, I have a written a simple dynamic menu seen here (http://www.digitaris.com). It uses an xml file to create the categories and...
  3. #2

    Default Re: Stumped on dynamic menu

    I believe that you are going to need to surround your <option> tags with one set of <CFLOOP> </CFLOOP> tags, referencing the query from the opening <CFLOOP> tag.

    Hope that helps,
    Mike
    RelentlessMike Guest

  4. #3

    Default Re: Stumped on dynamic menu

    Works perfectly! Cheers Mike!
    Marblehead Johnson Guest

  5. #4

    Default Re: Stumped on dynamic menu

    Hey - I had a similar problem but came back with not getting the result that I
    was wanting. I had the smae problem as he did, but the cfloop doesn't give me
    the fix.

    Attribute validation error for tag CFLOOP.
    The tag has an invalid attribute combination: . Possible combinations are:
    Required attributes: 'from,index,to'. Optional attributes: 'step'.
    Required attributes: 'condition'. Optional attributes: None.
    Required attributes: 'query'. Optional attributes: 'endrow,startrow'.
    Required attributes: 'index,list'. Optional attributes: 'delimiters'.
    Required attributes: 'collection,item'. Optional attributes: None.


    The error occurred in line 12

    10 : <cfoutput query="grabmensscheduleVARJV">
    11 : <select name="opponents" id="">
    12 : <cfloop><option value="#opponent#">#opponent#</option></cfloop>
    13 : </select>
    14 : </cfoutput>




    weswhite7 Guest

  6. #5

    Default Re: Stumped on dynamic menu

    Actually, I figured out the answer to what I was doing wrong and what would
    make your's much more simple.

    Do it like so and it works:

    <select all this stuff>
    <cfoutputquery="whateveritis">
    <option value="query">#query"</option
    </cfoutput>
    </select>

    weswhite7 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